Merge lp:~zorba-coders/zorba/create-user-typed-atomic-item into lp:zorba

Proposed by Ghislain Fourny
Status: Merged
Approved by: Chris Hillery
Approved revision: 10994
Merged at revision: 11026
Proposed branch: lp:~zorba-coders/zorba/create-user-typed-atomic-item
Merge into: lp:zorba
Diff against target: 60 lines (+24/-3)
3 files modified
include/zorba/item_factory.h (+11/-0)
src/api/itemfactoryimpl.cpp (+10/-3)
src/api/itemfactoryimpl.h (+3/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/create-user-typed-atomic-item
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Approve
Matthias Brantner Approve
Review via email: mp+120560@code.launchpad.net

Commit message

Introduces an item factory function to create atomic items with a user-defined type.

Description of the change

Introduces an item factory function to create atomic items with a user-defined type.

To post a comment you must log in.
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-08-21T13-23-59.457Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 3 Pending.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Markos Zaharioudakis (markos-za) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-09T08-02-47.326Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-09T08-15-54.402Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-09T08-39-59.249Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-09T09-04-02.857Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-09T09-35-10.718Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-09T09-56-43.59Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-09T10-09-42.663Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-09T10-21-41.198Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-09T10-41-42.261Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-09T10-47-46.656Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-10T07-45-51.739Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-10T08-10-48.025Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job create-user-typed-atomic-item-2012-09-10T08-23-47.376Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'include/zorba/item_factory.h'
--- include/zorba/item_factory.h 2012-08-16 18:31:02 +0000
+++ include/zorba/item_factory.h 2012-08-21 13:23:26 +0000
@@ -778,6 +778,17 @@
778 assignElementTypedValue(Item& aElement,778 assignElementTypedValue(Item& aElement,
779 std::vector<Item>& aTypedValue) = 0;779 std::vector<Item>& aTypedValue) = 0;
780780
781 /**
782 * Create an atomic item having a user-defined atomic type.
783 *
784 * @param aBaseItem the base item of the item to create.
785 * @param aTypeName the name of the type of the item to create.
786 *
787 * @return a new atomic item having the given user-defined atomic type.
788 */
789 virtual Item
790 createUserTypedAtomicItem(Item& aBaseItem, Item& aTypeName) = 0;
791
781 }; // class ItemFactory792 }; // class ItemFactory
782793
783} // namespace zorba794} // namespace zorba
784795
=== modified file 'src/api/itemfactoryimpl.cpp'
--- src/api/itemfactoryimpl.cpp 2012-08-16 18:31:02 +0000
+++ src/api/itemfactoryimpl.cpp 2012-08-21 13:23:26 +0000
@@ -950,11 +950,18 @@
950 return &*lItem;950 return &*lItem;
951}951}
952952
953
954
955
956#endif /* ZORBA_WITH_JSON */953#endif /* ZORBA_WITH_JSON */
957954
955zorba::Item ItemFactoryImpl::createUserTypedAtomicItem(
956 Item& aBaseItem,
957 Item& aTypeName)
958{
959 store::Item_t lRes;
960 store::Item_t lBaseItem = Unmarshaller::getInternalItem(aBaseItem);
961 store::Item_t lTypeName = Unmarshaller::getInternalItem(aTypeName);
962 theItemFactory->createUserTypedAtomicItem(lRes, lBaseItem, lTypeName);
963 return &*lRes;
964}
958965
959} // namespace zorba966} // namespace zorba
960/* vim:set et sw=2 ts=2: */967/* vim:set et sw=2 ts=2: */
961968
=== modified file 'src/api/itemfactoryimpl.h'
--- src/api/itemfactoryimpl.h 2012-08-16 18:31:02 +0000
+++ src/api/itemfactoryimpl.h 2012-08-21 13:23:26 +0000
@@ -278,6 +278,9 @@
278278
279#endif /* ZORBA_WITH_JSON */279#endif /* ZORBA_WITH_JSON */
280280
281 virtual Item
282 createUserTypedAtomicItem(Item& aBaseItem, Item& aTypeName);
283
281 protected:284 protected:
282 store::ItemFactory* theItemFactory;285 store::ItemFactory* theItemFactory;
283286

Subscribers

People subscribed via source and target branches