← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~gislenius/zorba/use-get-pul-factory-macro into lp:zorba

 

Ghislain Fourny has proposed merging lp:~gislenius/zorba/use-get-pul-factory-macro into lp:zorba.

Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~gislenius/zorba/use-get-pul-factory-macro/+merge/91260

Actually using the GET_PUL_FACTORY() macro defined in store_defs.h.

Replaced all occurrences of GET_STORE().getPULFactory() with GET_PUL_FACTORY().
-- 
https://code.launchpad.net/~gislenius/zorba/use-get-pul-factory-macro/+merge/91260
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/store/naive/simple_pul.cpp'
--- src/store/naive/simple_pul.cpp	2011-10-30 00:18:34 +0000
+++ src/store/naive/simple_pul.cpp	2012-02-02 12:45:24 +0000
@@ -262,7 +262,7 @@
 
   if (!found)
   {
-    UpdDelete* upd = GET_STORE().getPULFactory().createUpdDelete(pul, aQueryLoc, target);
+    UpdDelete* upd = GET_PUL_FACTORY().createUpdDelete(pul, aQueryLoc, target);
     pul->theDeleteList.push_back(upd);
 
     updates = new NodeUpdates(1);
@@ -278,7 +278,7 @@
         return;
     }
 
-    UpdDelete* upd = GET_STORE().getPULFactory().createUpdDelete(pul,  aQueryLoc,target);
+    UpdDelete* upd = GET_PUL_FACTORY().createUpdDelete(pul,  aQueryLoc,target);
     pul->theDeleteList.push_back(upd);
     updates->push_back(upd);
   }
@@ -361,7 +361,7 @@
   NodeUpdates* updates = 0;
   bool found = pul->theNodeToUpdatesMap.get(n, updates);
 
-  UpdInsertChildren* upd = GET_STORE().getPULFactory().
+  UpdInsertChildren* upd = GET_PUL_FACTORY().
   createUpdInsertChildren(pul, aQueryLoc, kind, target, sibling, children);
 
   if (kind == store::UpdateConsts::UP_INSERT_INTO)
@@ -403,7 +403,7 @@
   NodeUpdates* updates = 0;
   bool found = pul->theNodeToUpdatesMap.get(n, updates);
 
-  UpdInsertAttributes* upd = GET_STORE().getPULFactory().
+  UpdInsertAttributes* upd = GET_PUL_FACTORY().
   createUpdInsertAttributes(pul, aQueryLoc, target, attrs);
 
   pul->theDoFirstList.push_back(upd);
@@ -511,7 +511,7 @@
 
   if (!found)
   {
-    UpdatePrimitive* upd = GET_STORE().getPULFactory().createUpdReplaceElemContent(pul, aQueryLoc, target, newChild);
+    UpdatePrimitive* upd = GET_PUL_FACTORY().createUpdReplaceElemContent(pul, aQueryLoc, target, newChild);
     pul->theReplaceContentList.push_back(upd);
 
     updates = new NodeUpdates(1);
@@ -527,7 +527,7 @@
         throw XQUERY_EXCEPTION(err::XUDY0017);
     }
 
-    UpdatePrimitive* upd = GET_STORE().getPULFactory().createUpdReplaceElemContent(pul, aQueryLoc, target, newChild);
+    UpdatePrimitive* upd = GET_PUL_FACTORY().createUpdReplaceElemContent(pul, aQueryLoc, target, newChild);
     pul->theReplaceContentList.push_back(upd);
     updates->push_back(upd);
   }
@@ -555,20 +555,20 @@
   {
   case store::StoreConsts::attributeNode:
   {
-    upd = GET_STORE().getPULFactory().
+    upd = GET_PUL_FACTORY().
     createUpdReplaceAttrValue(pul, aQueryLoc, target, newValue);
     break;
   }
   case store::StoreConsts::textNode:
-    upd = GET_STORE().getPULFactory().
+    upd = GET_PUL_FACTORY().
     createUpdReplaceTextValue(pul, aQueryLoc, target, newValue);
     break;
   case store::StoreConsts::piNode:
-    upd = GET_STORE().getPULFactory().
+    upd = GET_PUL_FACTORY().
     createUpdReplacePiValue(pul, aQueryLoc, target, newValue);
     break;
   case store::StoreConsts::commentNode:
-    upd = GET_STORE().getPULFactory().
+    upd = GET_PUL_FACTORY().
     createUpdReplaceCommentValue(pul, aQueryLoc, target, newValue);
     break;
   default:
@@ -625,7 +625,7 @@
     ElementNode* elemTarget = ELEM_NODE(target);
     elemTarget->checkNamespaceConflict(newName.getp(), err::XUDY0023);
 
-    upd = GET_STORE().getPULFactory().
+    upd = GET_PUL_FACTORY().
     createUpdRenameElem(pul, aQueryLoc, target, newName);
     break;
   }
@@ -636,14 +636,14 @@
     if (elemParent != NULL)
       elemParent->checkNamespaceConflict(newName.getp(), err::XUDY0023);
 
-    upd = GET_STORE().getPULFactory().createUpdRenameAttr(pul, aQueryLoc, target, newName);
+    upd = GET_PUL_FACTORY().createUpdRenameAttr(pul, aQueryLoc, target, newName);
     break;
   }
   case store::StoreConsts::piNode:
   {
     zstring tmp;
     newName->getStringValue2(tmp);
-    upd = GET_STORE().getPULFactory().createUpdRenamePi(pul, aQueryLoc, target, tmp);
+    upd = GET_PUL_FACTORY().createUpdRenamePi(pul, aQueryLoc, target, tmp);
     break;
   }
   default:
@@ -698,7 +698,7 @@
     }
   }
 
-  UpdatePrimitive* upd = GET_STORE().getPULFactory().createUpdPut(this, aQueryLoc, target, uri);
+  UpdatePrimitive* upd = GET_PUL_FACTORY().createUpdPut(this, aQueryLoc, target, uri);
 
   thePutList.push_back(upd);
 }
@@ -718,7 +718,7 @@
     bool isInSubstitutionGroup)
 {
   UpdatePrimitive* upd = 
-  GET_STORE().getPULFactory().createUpdSetElementType(this,
+  GET_PUL_FACTORY().createUpdSetElementType(this,
                                                       aQueryLoc,
                                                       target,
                                                       typeName,
@@ -746,7 +746,7 @@
   store::Item_t typedValue = new ItemVector(valueV);
 
   UpdatePrimitive* upd =
-  GET_STORE().getPULFactory().createUpdSetElementType(this,
+  GET_PUL_FACTORY().createUpdSetElementType(this,
                                                       aQueryLoc,
                                                       target,
                                                       typeName,
@@ -768,7 +768,7 @@
     store::Item_t& typedValue)
 {
   UpdatePrimitive* upd = 
-  GET_STORE().getPULFactory().createUpdSetAttributeType(this, 
+  GET_PUL_FACTORY().createUpdSetAttributeType(this, 
                                                         aQueryLoc,
                                                         target,
                                                         typeName,
@@ -788,7 +788,7 @@
   store::Item_t typedValue = new ItemVector(typedValueV);
 
   UpdatePrimitive* upd =
-  GET_STORE().getPULFactory().createUpdSetAttributeType(this,
+  GET_PUL_FACTORY().createUpdSetAttributeType(this,
                                                         aQueryLoc,
                                                         target,
                                                         typeName,
@@ -810,7 +810,7 @@
   NodeUpdates* updates = 0;
   bool found = pul->theNodeToUpdatesMap.get(n, updates);
 
-  UpdRevalidate* upd = GET_STORE().getPULFactory().
+  UpdRevalidate* upd = GET_PUL_FACTORY().
   createUpdRevalidate(this, aQueryLoc, target);
 
   pul->theRevalidateList.push_back(upd);
@@ -841,7 +841,7 @@
   CollectionPul* pul = getCollectionPulByName(name.getp(),dyn_collection);
 
   pul->theCreateCollectionList.push_back(
-  GET_STORE().getPULFactory().createUpdCreateCollection(
+  GET_PUL_FACTORY().createUpdCreateCollection(
     pul,
     aQueryLoc,
     name,
@@ -859,7 +859,7 @@
   CollectionPul* pul = getCollectionPulByName(name.getp(),dyn_collection);
 
   pul->theDeleteCollectionList.push_back(
-  GET_STORE().getPULFactory().createUpdDeleteCollection(pul, aQueryLoc, name, dyn_collection));
+  GET_PUL_FACTORY().createUpdDeleteCollection(pul, aQueryLoc, name, dyn_collection));
 }
 
 
@@ -872,7 +872,7 @@
   CollectionPul* pul = getCollectionPulByName(name.getp(),dyn_collection);
 
   pul->theInsertIntoCollectionList.push_back(
-  GET_STORE().getPULFactory().createUpdInsertIntoCollection(pul, aQueryLoc, name, nodes, dyn_collection));
+  GET_PUL_FACTORY().createUpdInsertIntoCollection(pul, aQueryLoc, name, nodes, dyn_collection));
 } 
 
 
@@ -885,7 +885,7 @@
   CollectionPul* pul = getCollectionPulByName(name.getp(),dyn_collection);
 
   pul->theInsertIntoCollectionList.push_back(
-  GET_STORE().getPULFactory().createUpdInsertFirstIntoCollection(pul, aQueryLoc, name, nodes, dyn_collection));
+  GET_PUL_FACTORY().createUpdInsertFirstIntoCollection(pul, aQueryLoc, name, nodes, dyn_collection));
 }
 
 
@@ -898,7 +898,7 @@
   CollectionPul* pul = getCollectionPulByName(name.getp(),dyn_collection);
 
   pul->theInsertIntoCollectionList.push_back(
-  GET_STORE().getPULFactory().createUpdInsertLastIntoCollection(pul, aQueryLoc, name, nodes, dyn_collection));
+  GET_PUL_FACTORY().createUpdInsertLastIntoCollection(pul, aQueryLoc, name, nodes, dyn_collection));
 }
 
 
@@ -912,7 +912,7 @@
   CollectionPul* pul = getCollectionPulByName(name.getp(),dyn_collection);
 
   pul->theInsertIntoCollectionList.push_back(
-  GET_STORE().getPULFactory().createUpdInsertBeforeIntoCollection(pul, aQueryLoc, name, target, nodes, dyn_collection));
+  GET_PUL_FACTORY().createUpdInsertBeforeIntoCollection(pul, aQueryLoc, name, target, nodes, dyn_collection));
 }
 
 
@@ -926,7 +926,7 @@
   CollectionPul* pul = getCollectionPulByName(name.getp(),dyn_collection);
 
   pul->theInsertIntoCollectionList.push_back(
-  GET_STORE().getPULFactory().createUpdInsertAfterIntoCollection(pul, aQueryLoc, name, target, nodes, dyn_collection));
+  GET_PUL_FACTORY().createUpdInsertAfterIntoCollection(pul, aQueryLoc, name, target, nodes, dyn_collection));
 }
 
 
@@ -940,7 +940,7 @@
   CollectionPul* pul = getCollectionPulByName(name.getp(),dyn_collection);
 
   pul->theDeleteFromCollectionList.push_back(
-  GET_STORE().getPULFactory().createUpdDeleteNodesFromCollection(pul, aQueryLoc, name, nodes, isLast, dyn_collection));
+  GET_PUL_FACTORY().createUpdDeleteNodesFromCollection(pul, aQueryLoc, name, nodes, isLast, dyn_collection));
 }
 
 
@@ -953,7 +953,7 @@
     const store::IndexSpecification& spec,
     store::Iterator* sourceIter)
 {
-  UpdatePrimitive* upd = GET_STORE().getPULFactory().createUpdCreateIndex(this, aQueryLoc,  qname, spec, sourceIter);
+  UpdatePrimitive* upd = GET_PUL_FACTORY().createUpdCreateIndex(this, aQueryLoc,  qname, spec, sourceIter);
   theCreateIndexList.push_back(upd);
 }
 
@@ -963,7 +963,7 @@
     const store::Item_t& qname)
 {
   UpdatePrimitive* upd = 
-  GET_STORE().getPULFactory().createUpdDeleteIndex(this, aQueryLoc, qname);
+  GET_PUL_FACTORY().createUpdDeleteIndex(this, aQueryLoc, qname);
 
   theDeleteIndexList.push_back(upd);
 }
@@ -975,7 +975,7 @@
     store::Iterator* sourceIter)
 {
   UpdatePrimitive* upd = 
-  GET_STORE().getPULFactory().createUpdRefreshIndex(this, aQueryLoc,  qname, sourceIter);
+  GET_PUL_FACTORY().createUpdRefreshIndex(this, aQueryLoc,  qname, sourceIter);
 
   theRefreshIndexList.push_back(upd);
 }
@@ -990,7 +990,7 @@
       const store::Item_t& aCollectionName)
 {
   UpdatePrimitive* upd = 
-  GET_STORE().getPULFactory().createUpdActivateIC(this, aQueryLoc, qname, aCollectionName);
+  GET_PUL_FACTORY().createUpdActivateIC(this, aQueryLoc, qname, aCollectionName);
 
   theICActivationList.push_back(upd);
 }
@@ -1001,7 +1001,7 @@
       const store::Item_t& aFromCollectionName,
       const store::Item_t& aToCollectionName)
 {
-  UpdatePrimitive* upd = GET_STORE().getPULFactory().createUpdActivateForeignKeyIC(this,
+  UpdatePrimitive* upd = GET_PUL_FACTORY().createUpdActivateForeignKeyIC(this,
       aQueryLoc,
       qname,
       aFromCollectionName,
@@ -1013,7 +1013,7 @@
     const QueryLoc* aQueryLoc,
       const store::Item_t& qname)
 {
-  UpdatePrimitive* upd = GET_STORE().getPULFactory().createUpdDeActivateIC(this, aQueryLoc, qname);
+  UpdatePrimitive* upd = GET_PUL_FACTORY().createUpdDeActivateIC(this, aQueryLoc, qname);
   theICActivationList.push_back(upd);
 }
 
@@ -1026,7 +1026,7 @@
     const store::Item_t& uri,
     store::Item_t& doc)
 {
-  UpdatePrimitive* upd = GET_STORE().getPULFactory().createUpdCreateDocument(
+  UpdatePrimitive* upd = GET_PUL_FACTORY().createUpdCreateDocument(
       this, aQueryLoc, uri, doc);
   theCreateDocumentList.push_back(upd);
 }
@@ -1036,7 +1036,7 @@
     const QueryLoc* aQueryLoc,
     const store::Item_t& uri)
 {
-  UpdatePrimitive* upd = GET_STORE().getPULFactory().createUpdDeleteDocument(
+  UpdatePrimitive* upd = GET_PUL_FACTORY().createUpdDeleteDocument(
       this, aQueryLoc, uri);
   theDeleteDocumentList.push_back(upd);
 }
@@ -1052,7 +1052,7 @@
     const std::vector<zstring>& aCollations,
     long  aTimezone)
 {
-  UpdatePrimitive* upd = GET_STORE().getPULFactory().createUpdCreateHashMap(
+  UpdatePrimitive* upd = GET_PUL_FACTORY().createUpdCreateHashMap(
       this, aQueryLoc, aQName, aKeyTypes, aCollations, aTimezone);
   theCreateHashMapList.push_back(upd);
 }
@@ -1061,7 +1061,7 @@
     const QueryLoc* aQueryLoc,
     const store::Item_t& aQName)
 {
-  UpdatePrimitive* upd = GET_STORE().getPULFactory().createUpdDestroyHashMap(
+  UpdatePrimitive* upd = GET_PUL_FACTORY().createUpdDestroyHashMap(
       this, aQueryLoc, aQName);
   theDestroyHashMapList.push_back(upd);
 }
@@ -1072,7 +1072,7 @@
     const std::vector<store::Item_t>& aKey,
     const store::Iterator_t& aValue)
 {
-  UpdatePrimitive* upd = GET_STORE().getPULFactory().createUpdInsertIntoHashMap(
+  UpdatePrimitive* upd = GET_PUL_FACTORY().createUpdInsertIntoHashMap(
       this, aQueryLoc, aQName, aKey, aValue);
   theInsertIntoHashMapList.push_back(upd);
 }
@@ -1082,7 +1082,7 @@
       const store::Item_t& aQName,
       const std::vector<store::Item_t>& aKey)
 {
-  UpdatePrimitive* upd = GET_STORE().getPULFactory().createUpdRemoveFromHashMap(
+  UpdatePrimitive* upd = GET_PUL_FACTORY().createUpdRemoveFromHashMap(
       this, aQueryLoc, aQName, aKey);
   theRemoveFromHashMapList.push_back(upd);
 }


Follow ups