~davidagraf/zorba/trace_without_debug_info

« back to all changes in this revision

Viewing changes to src/context/static_context.h

  • Committer: David Graf
  • Date: 2012-06-27 07:20:59 UTC
  • mfrom: (10869.1.25 zorba)
  • Revision ID: davidagraf@gmail.com-20120627072059-723duu6vsbqu60ax
merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
#include "context/features.h"
42
42
 
43
43
#include "zorbautils/hashmap_zstring.h"
 
44
#include "zorbautils/hashmap_itemp.h"
44
45
 
45
46
#include "common/shared_types.h"
46
47
#include "util/stl_util.h"
382
383
 
383
384
class static_context : public SimpleRCObject
384
385
{
385
 
  typedef serializable_ItemPointerHashMap<StaticallyKnownCollection_t> CollectionMap;
386
 
 
387
 
  typedef serializable_ItemPointerHashMap<IndexDecl_t> IndexMap;
388
 
 
389
 
  typedef serializable_ItemPointerHashMap<ValueIC_t> ICMap;
390
 
 
391
 
  typedef serializable_ItemPointerHashMap<var_expr_t> VariableMap;
392
 
 
393
 
  typedef serializable_ItemPointerHashMap<FunctionInfo> FunctionMap;
394
 
 
395
 
  typedef serializable_ItemPointerHashMap<std::vector<FunctionInfo>* > FunctionArityMap;
396
 
 
397
 
  typedef serializable_ItemPointerHashMap<PrologOption> OptionMap;
398
 
 
399
 
  typedef serializable_HashMapZString<zstring> NamespaceBindings;
400
 
 
401
 
  typedef serializable_HashMapZString<xqtref_t> DocumentMap;
402
 
 
403
 
  typedef serializable_HashMapZString<xqtref_t> W3CCollectionMap;
 
386
  ITEM_PTR_HASH_MAP(StaticallyKnownCollection_t, CollectionMap);
 
387
 
 
388
  ITEM_PTR_HASH_MAP(IndexDecl_t, IndexMap);
 
389
 
 
390
  ITEM_PTR_HASH_MAP(ValueIC_t, ICMap);
 
391
 
 
392
  ITEM_PTR_HASH_MAP(var_expr_t, VariableMap);
 
393
 
 
394
  ITEM_PTR_HASH_MAP(FunctionInfo, FunctionMap);
 
395
 
 
396
  ITEM_PTR_HASH_MAP(std::vector<FunctionInfo>*, FunctionArityMap);
 
397
 
 
398
  ITEM_PTR_HASH_MAP(PrologOption, OptionMap);
 
399
 
 
400
  ZSTRING_HASH_MAP(zstring, NamespaceBindings);
 
401
 
 
402
  ZSTRING_HASH_MAP(xqtref_t, DocumentMap);
 
403
 
 
404
  ZSTRING_HASH_MAP(xqtref_t, W3CCollectionMap);
404
405
 
405
406
  typedef std::map<std::string, XQPCollator*> CollationMap;
406
407
 
422
423
    virtual ~ctx_module_t() {}
423
424
  };
424
425
 
425
 
  typedef serializable_HashMapZString<ctx_module_t> ExternalModuleMap;
 
426
  ZSTRING_HASH_MAP(ctx_module_t, ExternalModuleMap);
426
427
 
427
428
public:
428
429
  static const zstring DOT_VAR_NAME;
448
449
  // Namespaces of external modules declaring zorba builtin functions
449
450
  static const char* ZORBA_MATH_FN_NS;
450
451
  static const char* ZORBA_BASE64_FN_NS;
 
452
 
451
453
  static const char* ZORBA_JSON_FN_NS;
 
454
 
452
455
  static const char* ZORBA_NODEREF_FN_NS;
453
456
  static const char* ZORBA_NODEPOS_FN_NS;
454
457
  static const char* ZORBA_STORE_DYNAMIC_COLLECTIONS_DDL_FN_NS;
461
464
  static const char* ZORBA_STORE_STATIC_INTEGRITY_CONSTRAINTS_DML_FN_NS;
462
465
  static const char* ZORBA_STORE_DYNAMIC_DOCUMENTS_FN_NS;
463
466
  static const char* ZORBA_STORE_DYNAMIC_UNORDERED_MAP_FN_NS;
 
467
 
 
468
#ifdef ZORBA_WITH_JSON
 
469
  static const char* JSONIQ_NS;
 
470
  static const char* JSONIQ_FN_NS;
 
471
#endif
 
472
 
464
473
  static const char* ZORBA_SCHEMA_FN_NS;
465
474
  static const char* ZORBA_XQDOC_FN_NS;
466
475
  static const char* ZORBA_RANDOM_FN_NS;
467
476
  static const char* ZORBA_INTROSP_SCTX_FN_NS;
468
477
  static const char* ZORBA_REFLECTION_FN_NS;
469
478
  static const char* ZORBA_STRING_FN_NS;
 
479
 
470
480
  static const char* ZORBA_URI_FN_NS;
 
481
 
471
482
  static const char* ZORBA_FETCH_FN_NS;
472
483
  static const char* ZORBA_NODE_FN_NS;
473
484
  static const char* ZORBA_XML_FN_NS;
501
512
 
502
513
  std::string                             theModuleNamespace;
503
514
 
504
 
  std::vector<zstring>                  * theImportedBuiltinModules;
 
515
  std::vector<zstring>                    theImportedBuiltinModules;
505
516
 
506
517
  BaseUriInfo                           * theBaseUriInfo;
507
518
 
575
586
 
576
587
  StaticContextConsts::validation_mode_t     theValidationMode;
577
588
 
578
 
  std::vector<DecimalFormat_t>             * theDecimalFormats;
 
589
  std::vector<DecimalFormat_t>               theDecimalFormats;
579
590
 
580
591
  bool                                       theAllWarningsDisabled;
581
592
 
826
837
 
827
838
  void unbind_fn(const store::Item* qname, ulong arity);
828
839
 
829
 
  function* lookup_fn(const store::Item* qname, ulong arity);
 
840
  function* lookup_fn(
 
841
      const store::Item* qname,
 
842
      ulong arity,
 
843
      bool skipDisabled = true);
830
844
 
831
 
  function* lookup_local_fn(const store::Item* qname, ulong arity);
 
845
  function* lookup_local_fn(
 
846
      const store::Item* qname,
 
847
      ulong arity,
 
848
      bool skipDisabled = true);
832
849
 
833
850
  void get_functions(std::vector<function*>& functions) const;
834
851