Merge lp:~zorba-coders/zorba/create-user-typed-atomic-item into lp:zorba
- create-user-typed-atomic-item
- Merge into trunk
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 |
Related bugs: |
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.
Zorba Build Bot (zorba-buildbot) wrote : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
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.
Matthias Brantner (matthias-brantner) : | # |
Markos Zaharioudakis (markos-za) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job create-
All tests succeeded!
Preview Diff
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 |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ create- user-typed- atomic- item-2012- 08-21T13- 23-59.457Z/ log.html
Log at: http://