## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.10

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XObjectFactoryDefault Class Reference

This class handles the creation of XObjects and manages their lifetime. More...

`#include <XObjectFactoryDefault.hpp>`

Inheritance diagram for XObjectFactoryDefault:

[legend]
Collaboration diagram for XObjectFactoryDefault:

[legend]
List of all members.

## Public Types

- typedef XNodeSetAllocator::size_type size_type
- typedef XalanVector<XObject*> XObjectCollectionType
- typedef XalanVector<XNumber*> XNumberCacheType
- typedef XalanVector<XNodeSet*> XNodeSetCacheType
- typedef XalanVector<XString*> XStringCacheType
- enum {
  eDefaultXStringBlockSize = 10, eDefaultXNumberBlockSize = 10, eDefaultXNodeSetBlockSize = 10, eDefaultXNodeSetNodeProxyBlockSize = 5,
  eXNumberCacheMax = 40, eXNodeSetCacheMax = 40, eXStringCacheMax = 40, eXResultTreeFragCacheMax = 40
  }

## Public Methods

- XObjectFactoryDefault (MemoryManagerType &theManager XALAN_DEFAULT_MEMMGR, size_type theXStringBlockSize=eDefaultXStringBlockSize, size_type theXNumberBlockSize=eDefaultXNumberBlockSize, size_type theXNodeSetBlockSize=eDefaultXNodeSetBlockSize, size_type theXNodeSetNodeProxyBlockSize=eDefaultXNodeSetNodeProxyBlockSize)
    Construct a factory for creating XObjects. More...
- virtual ~XObjectFactoryDefault ()
- MemoryManagerType& getMemoryManager ()
- virtual void reset ()
    Reset the instance. More...
- virtual const XObjectPtr createBoolean (bool theValue)
    Create a boolean XObject from a boolean value. More...
- virtual const XObjectPtr createNodeSet (BorrowReturnMutableNodeRefList &theValue)
    Create a node set XObject from a node list. More...
- virtual const XObjectPtr createNodeSet (XalanNode *theValue)
    Create a node set XObject from a node. More...
- virtual const XObjectPtr createNull ()
    Create a null XObject. More...
- virtual const XObjectPtr createNumber (double theValue)
    Create a numeric XObject from a number. More...
- virtual const XObjectPtr createNumber (const XToken &theValue)
    Create a numeric XObject from an XToken. More...
- virtual const XObjectPtr createString (const XalanDOMString &theValue)
    Create a string XObject from a string. More...
- virtual const XObjectPtr createString (const XalanDOMChar *theValue)
    Create a string XObject from a null-terminated array of characters. More...
- virtual const XObjectPtr createString (const XalanDOMChar *theValue, unsigned int theLength)
    Create a string XObject from an array of characters. More...
- virtual const XObjectPtr createString (const XToken &theValue)
    Create a string XObject from an XToken. More...
- virtual const XObjectPtr createStringReference (const XalanDOMString &theValue)
    Create a string XObject from a string. More...
- virtual const XObjectPtr createStringAdapter (const XObjectPtr &theValue)
    Create a string XObject that will adapt another XObject to behave like a string. More...
- virtual const XObjectPtr createString (GetAndReleaseCachedString &theValue)
    Create a string XObject from a cached XalanDOMString,. More...
- virtual const XObjectPtr createUnknown (const XalanDOMString &theValue)
    Create an "unknown" XObject from a string. More...

## Static Public Methods

- XObjectFactoryDefault* create (MemoryManagerType &theManager, size_type theXStringBlockSize=eDefaultXStringBlockSize, size_type theXNumberBlockSize=eDefaultXNumberBlockSize, size_type theXNodeSetBlockSize=eDefaultXNodeSetBlockSize, size_type theXNodeSetNodeProxyBlockSize=eDefaultXNodeSetNodeProxyBlockSize)

## Protected Methods

- virtual bool doReturnObject (XObject *theXObject, bool fInReset=false)
    Return an XObject to the factory. More...

## Detailed Description

This class handles the creation of XObjects and manages their lifetime.

## Member Typedef Documentation

typedef XalanVector< XNodeSet *> XObjectFactoryDefault::XNodeSetCacheType<XNodeSet*>

typedef XalanVector< XNumber *> XObjectFactoryDefault::XNumberCacheType<XNumber*>

typedef XalanVector< XObject *> XObjectFactoryDefault::XObjectCollectionType<XObject*>

typedef XalanVector< XString *> XObjectFactoryDefault::XStringCacheType<XString*>

typedef XNodeSetAllocator::size_type XObjectFactoryDefault::size_type

## Member Enumeration Documentation

anonymous enum

Enumeration values:

  eDefaultXStringBlockSize |
  eDefaultXNumberBlockSize |
  eDefaultXNodeSetBlockSize |
  eDefaultXNodeSetNodeProxyBlockSize |
  eXNumberCacheMax |
  eXNodeSetCacheMax |
  eXStringCacheMax |
  eXResultTreeFragCacheMax |

## Constructor & Destructor Documentation

XObjectFactoryDefault::XObjectFactoryDefault ( | MemoryManagerType &theManager XALAN_DEFAULT_MEMMGR,
| size_type theXStringBlockSize = eDefaultXStringBlockSize,
| size_type theXNumberBlockSize = eDefaultXNumberBlockSize,
| size_type theXNodeSetBlockSize = eDefaultXNodeSetBlockSize,
| size_type theXNodeSetNodeProxyBlockSize = eDefaultXNodeSetNodeProxyBlockSize )`[explicit]`

Construct a factory for creating XObjects.

Parameters:

  theXStringBlockSize | allocation block size
  theXNumberBlockSize | allocation block size
  theXNodeSetBlockSize | allocation block size

XObjectFactoryDefault::~XObjectFactoryDefault ( | )`[virtual]`

## Member Function Documentation

XObjectFactoryDefault * XObjectFactoryDefault::create ( | MemoryManagerType & theManager,
| size_type theXStringBlockSize = eDefaultXStringBlockSize,
| size_type theXNumberBlockSize = eDefaultXNumberBlockSize,
| size_type theXNodeSetBlockSize = eDefaultXNodeSetBlockSize,
| size_type theXNodeSetNodeProxyBlockSize = eDefaultXNodeSetNodeProxyBlockSize )`[static]`

const XObjectPtr XObjectFactoryDefault::createBoolean ( | bool theValue )`[virtual]`

Create a boolean XObject from a boolean value.

Parameters:

  theValue | value used to create object

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createNodeSet ( | XalanNode * theValue )`[virtual]`

Create a node set XObject from a node.

Parameters:

  theNOde | value used to create object.

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createNodeSet ( | BorrowReturnMutableNodeRefList & theValue )`[virtual]`

Create a node set XObject from a node list.

Parameters:

  theValue | value used to create object. theValue will be owned by the new XObject.

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createNull ( | )`[virtual]`

Create a null XObject.

Parameters:

  theValue | value used to create object

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createNumber ( | const XToken & theValue )`[virtual]`

Create a numeric XObject from an XToken.

The XToken instance must be inexistence for the lifetime of the object.

Parameters:

  theValue | value used to create object

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createNumber ( | double theValue )`[virtual]`

Create a numeric XObject from a number.

Parameters:

  theValue | value used to create object

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createString ( | GetAndReleaseCachedString & theValue )`[virtual]`

Create a string XObject from a cached XalanDOMString,.

Parameters:

  theValue | value used to create object

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createString ( | const XToken & theValue )`[virtual]`

Create a string XObject from an XToken.

The XToken instance must be inexistence for the lifetime of the object.

Parameters:

  theValue | value used to create object

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createString ( | const XalanDOMChar * theValue,
| unsigned int theLength )`[virtual]`

Create a string XObject from an array of characters.

Parameters:

  theValue | a pointer to the array

an theLength the length of the array

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createString ( | const XalanDOMChar * theValue )`[virtual]`

Create a string XObject from a null-terminated array of characters.

Parameters:

  theValue | a pointer to the array

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createString ( | const XalanDOMString & theValue )`[virtual]`

Create a string XObject from a string.

Parameters:

  theValue | value used to create object

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createStringAdapter ( | const XObjectPtr & theValue )`[virtual]`

Create a string XObject that will adapt another XObject to behave like a string.

The XObject holds a reference to the other XObject.

Parameters:

  theValue | value used to create object

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createStringReference ( | const XalanDOMString & theValue )`[virtual]`

Create a string XObject from a string.

The XObject will hold a reference to the supplied string, so the string must be in scope for the lifetime of the instance

Parameters:

  theValue | value used to create object

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

const XObjectPtr XObjectFactoryDefault::createUnknown ( | const XalanDOMString & theValue )`[virtual]`

Create an "unknown" XObject from a string.

Parameters:

  theValue | value used to create object

Returns:
  pointer to new object

Reimplemented from XObjectFactory.

bool XObjectFactoryDefault::doReturnObject ( | XObject * theXObject,
| bool fInReset = false )`[protected, virtual]`

Return an XObject to the factory.

Parameters:

  theXObject | XObject to be returned
  fInReset | true when called during reset().

Reimplemented from XObjectFactory.

MemoryManagerType & XObjectFactoryDefault::getMemoryManager ( | )

| Reimplemented from XObjectFactory.

void XObjectFactoryDefault::reset ( | )`[virtual]`

| Reset the instance. This invalidates all existing instances created with this XObjectFactory. Reimplemented from XObjectFactory.

The documentation for this class was generated from the following file:

- XObjectFactoryDefault.hpp

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.10 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.