8#ifndef INCLUDED_BALXML_PREFIXSTACK
9#define INCLUDED_BALXML_PREFIXSTACK
112#include <balscm_version.h>
119#include <bsl_iosfwd.h>
120#include <bsl_string.h>
121#include <bsl_utility.h>
122#include <bsl_vector.h>
127class NamespaceRegistry;
243 void print(bsl::ostream& stream,
bool fullNames =
false)
const;
268 d_numPrefixes = size;
275 return d_namespaceRegistry;
281 return d_numPrefixes;
287 index = (index < 0 ? d_numPrefixes + index : index);
289 return d_prefixes[index].first.c_str();
295 index = (index < 0 ? d_numPrefixes + index : index);
297 return d_prefixes[index].second;
Definition balxml_namespaceregistry.h:181
Definition balxml_prefixstack.h:137
void reset()
Removes all prefixes from the internal collection.
Definition balxml_prefixstack.h:258
const char * namespaceUriByIndex(int index) const
int lookupNamespaceId(const bsl::string_view &prefix) const
PrefixStack(NamespaceRegistry *namespaceRegistry, bslma::Allocator *basicAllocator=0)
NamespaceRegistry * namespaceRegistry() const
Definition balxml_prefixstack.h:273
const char * namespacePrefixByIndex(int index) const
Definition balxml_prefixstack.h:285
PrefixStack(const PrefixStack &original, bslma::Allocator *basicAllocator=0)
int namespaceIdByIndex(int index) const
Definition balxml_prefixstack.h:293
void restoreToSize(int size)
Definition balxml_prefixstack.h:265
int numPrefixes() const
Return the current number of prefixes in the stack.
Definition balxml_prefixstack.h:279
int popPrefixes(int count)
~PrefixStack()
Destroy this object.
Definition balxml_prefixstack.h:252
const char * lookupNamespacePrefix(const bsl::string_view &prefix) const
void print(bsl::ostream &stream, bool fullNames=false) const
const char * lookupNamespaceUri(int nsId) const
int pushPrefix(const bsl::string_view &prefix, const bsl::string_view &namespaceUri)
const char * lookupNamespaceUri(const bsl::string_view &prefix) const
Definition bslstl_stringview.h:441
Definition bslstl_vector.h:1025
void swap(vector &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:1712
Definition bslma_allocator.h:457
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balxml_base64parser.h:150