BloombergLP::balxml::PrefixStack

PrefixStack allows associating a unique integer (namespace ID) with prefix.

Synopsis

Declared in <balxml_prefixstack.h>

class PrefixStack;

Member Functions

NameDescription
PrefixStack [constructor]Constructors
~PrefixStack [destructor]Destroy this object.
lookupNamespaceId Return ID of the namespace registered for the specified prefix or -1 if not registered.
lookupNamespacePrefix Return a copy of the specified prefix if prefix is registered or an empty string if prefix is not registered.
lookupNamespaceUri lookupNamespaceUri overloads
namespaceIdByIndex Return the namespace ID at the specified index in the prefix stack, where an index of 0 is the oldest ID on the stack. If index is negative, return the ID at position 'numPrefixes() - index'. Thus, an index of -1 will return the most recent ID on the stack (i.e., the top of the stack). The behavior is undefined if index > numPrefixes() or index < -numPrefixes().
namespacePrefixByIndex Return the namespace prefix at the specified index in the prefix stack, where an index of 0 is the oldest prefix on the stack. If index is negative, return the prefix at position 'numPrefixes() - index'. Thus, an index of -1 will return the most recent prefix on the stack (i.e., the top of the stack). The behavior is undefined if index > numPrefixes() or index < -numPrefixes().
namespaceRegistry Return the pointer of NamespaceRegistry associated with this PrefixStack.
namespaceUriByIndex Return the namespace URI at the specified index in the prefix stack, where an index of 0 is the oldest URI on the stack. If index is negative, return the URI at position 'numPrefixes() - index'. Thus, an index of -1 will return the most recent URI on the stack (i.e., the top of the stack). The behavior is undefined if index > numPrefixes() or index < -numPrefixes().
numPrefixes Return the current number of prefixes in the stack.
popPrefixes Remove the specified last count number prefixes. Return the number of actually removed prefixes.
print Print the content of this object to the specified stream. The optionally specified fullNames specifies how namespaces should be printed: true for the full names and false only for IDs.
pushPrefix Map the specified namespaceUri to the specified prefix and return the namespace Id. New mapping eclipses previous mapping.
reset Removes all prefixes from the internal collection.
restoreToSize Restore stack to the specified size. The behavior is undefined if PrefixStack contains fewer prefixes than requested size.