~zorba-coders/zorba/bugs-912586-912593-912722

« back to all changes in this revision

Viewing changes to src/api/itemfactoryimpl.cpp

  • Committer: Cezar Andrei
  • Date: 2012-03-28 15:42:12 UTC
  • mfrom: (10606.1.129 zorba)
  • Revision ID: cezar.lp@cezarandrei.com-20120328154212-jh2heq49xcqjppce
Merge from trunck and resolve ChangeLog conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
  std::stringstream lSs;
213
213
  while (aEncodedStream.good()) 
214
214
  {
215
 
    lSs.put(aEncodedStream.get());
 
215
    char c = aEncodedStream.get();
 
216
    if (aEncodedStream.good())
 
217
    {
 
218
      lSs.put(c);
 
219
    }
216
220
  }
217
221
  std::string lContent = lSs.str();
218
222
  return createBase64Binary(lContent.c_str(), lContent.size());
219
223
}
220
224
 
221
225
 
 
226
Item
 
227
ItemFactoryImpl::createStreamableBase64Binary(
 
228
    std::istream &stream,
 
229
    StreamReleaser streamReleaser,
 
230
    bool seekable,
 
231
    bool encoded)
 
232
{
 
233
  store::Item_t lItem;
 
234
  theItemFactory->createStreamableBase64Binary(
 
235
      lItem, stream, streamReleaser, seekable, encoded
 
236
    );
 
237
  return &*lItem;
 
238
}
 
239
 
 
240
 
222
241
Item ItemFactoryImpl::createBoolean(bool aValue)
223
242
{
224
243
  store::Item_t lItem;
269
288
ItemFactoryImpl::createInteger(long long aInteger)
270
289
{
271
290
  store::Item_t lItem;
272
 
  Integer const lInteger(aInteger);
 
291
  xs_integer const lInteger(aInteger);
273
292
  theItemFactory->createInteger(lItem, lInteger);
274
293
  return &*lItem;
275
294
}
281
300
  zstring const &lString = Unmarshaller::getInternalString( aInteger );
282
301
  store::Item_t lItem;
283
302
  try {
284
 
    Integer const lInteger( lString.c_str() );
 
303
    xs_integer const lInteger( lString.c_str() );
285
304
    theItemFactory->createInteger(lItem, lInteger);
286
305
  }
287
306
  catch ( std::exception const& ) {
478
497
{
479
498
  store::Item_t lItem;
480
499
  if (aValue < 0) {
481
 
    Integer const lInteger(aValue);
 
500
    xs_integer const lInteger(aValue);
482
501
    theItemFactory->createNegativeInteger(lItem, lInteger);
483
502
  }
484
503
  return &*lItem;
488
507
Item ItemFactoryImpl::createNonNegativeInteger ( unsigned long long aValue )
489
508
{
490
509
  store::Item_t lItem;
491
 
  Integer lInteger(aValue);
 
510
  xs_nonNegativeInteger lInteger(aValue);
492
511
  theItemFactory->createNonNegativeInteger(lItem, lInteger);
493
512
  return &*lItem;
494
513
}
498
517
{
499
518
  store::Item_t lItem;
500
519
  if (aValue < 0) {
501
 
    Integer const lInteger(aValue);
 
520
    xs_integer const lInteger(aValue);
502
521
    theItemFactory->createNonPositiveInteger(lItem, lInteger);
503
522
  }
504
523
  return &*lItem;
508
527
Item ItemFactoryImpl::createPositiveInteger ( unsigned long long aValue )
509
528
{
510
529
  store::Item_t lItem;
511
 
  Integer lInteger(aValue);
 
530
  xs_nonNegativeInteger lInteger(aValue);
512
531
  theItemFactory->createPositiveInteger(lItem, lInteger);
513
532
  return &*lItem;
514
533
}
696
715
    Item aTypeName,
697
716
    bool aHasTypedValue,
698
717
    bool aHasEmptyValue,
699
 
    std::vector<std::pair<String, String> > aNsBindings)
 
718
    NsBindings aNsBindings)
700
719
{
701
720
  store::Item_t lItem;
702
721
  store::Item_t lNodeName = Unmarshaller::getInternalItem(aNodeName);