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
1=== modified file 'include/zorba/item_factory.h'
2--- include/zorba/item_factory.h 2012-08-16 18:31:02 +0000
3+++ include/zorba/item_factory.h 2012-08-21 13:23:26 +0000
4@@ -778,6 +778,17 @@
5 assignElementTypedValue(Item& aElement,
6 std::vector<Item>& aTypedValue) = 0;
7
8+ /**
9+ * Create an atomic item having a user-defined atomic type.
10+ *
11+ * @param aBaseItem the base item of the item to create.
12+ * @param aTypeName the name of the type of the item to create.
13+ *
14+ * @return a new atomic item having the given user-defined atomic type.
15+ */
16+ virtual Item
17+ createUserTypedAtomicItem(Item& aBaseItem, Item& aTypeName) = 0;
18+
19 }; // class ItemFactory
20
21 } // namespace zorba
22
23=== modified file 'src/api/itemfactoryimpl.cpp'
24--- src/api/itemfactoryimpl.cpp 2012-08-16 18:31:02 +0000
25+++ src/api/itemfactoryimpl.cpp 2012-08-21 13:23:26 +0000
26@@ -950,11 +950,18 @@
27 return &*lItem;
28 }
29
30-
31-
32-
33 #endif /* ZORBA_WITH_JSON */
34
35+zorba::Item ItemFactoryImpl::createUserTypedAtomicItem(
36+ Item& aBaseItem,
37+ Item& aTypeName)
38+{
39+ store::Item_t lRes;
40+ store::Item_t lBaseItem = Unmarshaller::getInternalItem(aBaseItem);
41+ store::Item_t lTypeName = Unmarshaller::getInternalItem(aTypeName);
42+ theItemFactory->createUserTypedAtomicItem(lRes, lBaseItem, lTypeName);
43+ return &*lRes;
44+}
45
46 } // namespace zorba
47 /* vim:set et sw=2 ts=2: */
48
49=== modified file 'src/api/itemfactoryimpl.h'
50--- src/api/itemfactoryimpl.h 2012-08-16 18:31:02 +0000
51+++ src/api/itemfactoryimpl.h 2012-08-21 13:23:26 +0000
52@@ -278,6 +278,9 @@
53
54 #endif /* ZORBA_WITH_JSON */
55
56+ virtual Item
57+ createUserTypedAtomicItem(Item& aBaseItem, Item& aTypeName);
58+
59 protected:
60 store::ItemFactory* theItemFactory;
61

Subscribers

People subscribed via source and target branches