17 #ifndef ZORBA_ITEM_FACTORY_API_H
18 #define ZORBA_ITEM_FACTORY_API_H
23 #include <zorba/config.h>
52 createString(
const String& aString) = 0;
65 createStreamableString( std::istream &stream,
67 bool seekable =
false ) = 0;
82 createStreamableString( std::istream &stream,
85 bool seekable =
false ) = 0;
94 createAnyURI(
const String& aURI) = 0;
106 createQName(
const String& aNamespace,
const String& aPrefix,
107 const String& aLocalname) = 0;
117 createQName(
const String& aNamespace,
const String& aLocalname) = 0;
129 createQName(
const String& aQNameString) = 0;
138 createNCName(
const String& aValue) = 0;
149 createBase64Binary(
const char* aBinData,
size_t aLength) = 0;
158 createBase64Binary(std::istream& aStream) = 0;
168 createBase64Binary(
const unsigned char* aBinData,
size_t aLength) = 0;
183 createStreamableBase64Binary(
184 std::istream &stream,
186 bool seekable =
false,
187 bool encoded =
false) = 0;
204 createStreamableBase64Binary(
205 std::istream &stream,
208 bool seekable =
false,
209 bool encoded =
false) = 0;
218 createBoolean(
bool aValue) = 0;
227 createDecimalFromLong (
unsigned long aValue) = 0;
236 createDecimalFromDouble (
double aValue) = 0;
245 createDecimal (
const String& aValue) = 0;
254 createInteger(
long long aInteger) = 0;
263 createInteger(
const String& aInteger) = 0;
272 createLong (
long long aLong ) = 0;
281 createInt (
int aInt ) = 0;
290 createShort (
short aShort ) = 0;
299 createByte (
char aByte ) = 0;
308 createDate (
const String& aDate ) = 0;
319 createDate (
short aYear,
short aMonth,
short aDay ) = 0;
334 createDateTime(
short aYear,
short aMonth,
short aDay,
335 short aHour,
short aMinute,
double aSecond,
336 short aTimeZone_hours) = 0;
350 createDateTime(
short aYear,
short aMonth,
short aDay,
351 short aHour,
short aMinute,
double aSecond) = 0;
361 createDateTime(
const String& aDateTimeValue ) = 0;
370 createDouble (
double aValue ) = 0;
379 createDouble (
const String& aValue ) = 0;
388 createDuration(
const String& aValue ) = 0;
402 createDuration (
short aYear,
short aMonths,
short aDays,
403 short aHours,
short aMinutes,
double aSeconds ) = 0;
412 createDayTimeDuration(
const String& aValue ) = 0;
421 createYearMonthDuration(
const String& aValue ) = 0;
431 createDocumentNode(
const String& aBaseUri,
const String& aDocUri ) = 0;
440 createFloat (
const String& aValue ) = 0;
449 createFloat (
float aValue ) = 0;
458 createGDay (
const String& aValue ) = 0;
467 createGDay (
short aDay ) = 0;
476 createGMonth (
const String& aValue ) = 0;
485 createGMonth (
short aMonth ) = 0;
494 createGMonthDay (
const String& aValue ) = 0;
504 createGMonthDay (
short aMonth,
short aDay ) = 0;
513 createGYear (
const String& aValue ) = 0;
522 createGYear (
short aYear ) = 0;
531 createGYearMonth (
const String& aValue ) = 0;
541 createGYearMonth (
short aYear,
short aMonth ) = 0;
553 createHexBinary(
const char* aData,
size_t aSize,
554 bool aIsEncoded =
true ) = 0;
563 createNegativeInteger (
long long aValue ) = 0;
572 createNonNegativeInteger (
unsigned long long aValue ) = 0;
581 createNonPositiveInteger (
long long aValue ) = 0;
590 createPositiveInteger (
unsigned long long aValue ) = 0;
599 createTime (
const String& aValue ) = 0;
610 createTime (
short aHour,
short aMinute,
double aSecond ) = 0;
622 createTime (
short aHour,
short aMinute,
double aSecond,
short aTimeZone_hours ) = 0;
631 createUnsignedByte(
const unsigned char aValue) = 0;
640 createUnsignedInt(
unsigned int aValue) = 0;
649 createUnsignedLong(
unsigned long long aValue) = 0;
658 createUnsignedShort(
unsigned short aValue) = 0;
683 createElementNode(
Item& aParent,
705 createAttributeNode(
Item aParent,
708 Item aTypedValue) = 0;
711 createAttributeNode(
Item aParent,
714 std::vector<Item> aTypedValue) = 0;
725 virtual Item createCommentNode (
740 virtual Item createPiNode (
755 virtual Item createTextNode(
764 virtual Item createUntypedAtomic(
const String& value) = 0;
766 #ifdef ZORBA_WITH_JSON
771 virtual Item createJSONNull() = 0;
780 virtual Item createJSONNumber(
String aString) = 0;
787 virtual Item createJSONObject(std::vector<std::pair<Item, Item> >& aNames) = 0;
796 virtual Item createJSONArray(std::vector<Item>& aItems) = 0;
813 assignElementTypedValue(
Item& aElement,
814 Item aTypedValue) = 0;
828 assignElementTypedValue(
Item& aElement,
829 std::vector<Item>& aTypedValue) = 0;
840 createUserTypedAtomicItem(
Item& aBaseItem,
Item& aTypeName) = 0;
855 createDateTimeStamp(
short aYear,
short aMonth,
short aDay,
856 short aHour,
short aMinute,
double aSecond,
857 short aTimeZone_hours) = 0;
867 createDateTimeStamp(
const String& aDateTimeStampValue ) = 0;
virtual ~ItemFactory()
Destructor.
void(* StreamReleaser)(std::istream *)
std::vector< std::pair< String, String > > NsBindings
Used for Item::getNamespaceBindings() and ItemFactory::createElementNode().
The Zorba Item interface.
ItemFactory to create Items.