Adobe Source Libraries 1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches

Scope-based runtime context stack for glossary lookups. More...

#include <adobe/xstring.hpp>

Inheritance diagram for xstring_context_t:

Public Types

typedef implementation::context_frame_t::callback_proc_t callback_proc_t
typedef implementation::context_frame_t::preorder_predicate_t preorder_predicate_t

Public Member Functions

 xstring_context_t (const char *parse_first, const char *parse_last, const line_position_t &parse_info=line_position_t("xstring_context_t"))
template<typename I>
 xstring_context_t (I first_attribute, I last_attribute)
template<typename I>
 xstring_context_t (I first_attribute, I last_attribute, const unsigned char *parse_first, const unsigned char *parse_last, const line_position_t &parse_info=line_position_t("xstring_context_t"))
void set_preorder_predicate (preorder_predicate_t proc)
void set_element_handler (callback_proc_t proc)
 ~xstring_context_t ()

Detailed Description

The xstring_context_t class is used to add context sensitivity to xstring lookups. Example:

{
adobe::attribute_set_t attribute_set;
attribute_set.push_back(std::make_pair(adobe::static_name_t("context"), adobe::static_name_t("some_view")));
adobe::xstring_context_t mycontext(attribute_set);
// anything here is looked up with the context='some_view'; other attributes remain unchanged
}
// now our context is out scope and we go back to what we had before.
An associated array based on adobe::token_range_t. A utility class for the xml_parser_t.
Utility wrapper to construct name_t with strings of static storage duration.
Definition name.hpp:135
Scope-based runtime context stack for glossary lookups.
Definition xstring.hpp:258

There is also a constructor that takes a name/value pair for simple context construction. Example:

{
// anything here is looked up with the context='some_view'; other attributes remain unchanged
}
// now our context is out scope and we go back to what we had before.

There is also a constructor that takes a set of std::pair<adobe::name_t, adobe::name_t> for simple context construction. Example:

{
std::vector<std::pair<adobe::name_t, adobe::name_t> > my_set;
// fill in my_set ...
adobe::xstring_context_t mycontext(&my_set[0], &my_set[my_set.size()]);
// anything here is looked up with a context affected by my_set
}
// now our context is out scope and we go back to what we had before.

Definition at line 258 of file xstring.hpp.

Member Typedef Documentation

◆ callback_proc_t

typedef implementation::context_frame_t::callback_proc_t callback_proc_t

Definition at line 259 of file xstring.hpp.

◆ preorder_predicate_t

typedef implementation::context_frame_t::preorder_predicate_t preorder_predicate_t

Definition at line 260 of file xstring.hpp.

Constructor & Destructor Documentation

◆ xstring_context_t() [1/3]

xstring_context_t ( const char * parse_first,
const char * parse_last,
const line_position_t & parse_info = line_position_t("xstring_context_t") )

Definition at line 262 of file xstring.hpp.

◆ xstring_context_t() [2/3]

template<typename I>
xstring_context_t ( I first_attribute,
I last_attribute )

Definition at line 277 of file xstring.hpp.

◆ xstring_context_t() [3/3]

template<typename I>
xstring_context_t ( I first_attribute,
I last_attribute,
const unsigned char * parse_first,
const unsigned char * parse_last,
const line_position_t & parse_info = line_position_t("xstring_context_t") )

Definition at line 284 of file xstring.hpp.

◆ ~xstring_context_t()

Definition at line 308 of file xstring.hpp.

Member Function Documentation

◆ set_preorder_predicate()

void set_preorder_predicate ( preorder_predicate_t proc)

Definition at line 300 of file xstring.hpp.

◆ set_element_handler()

void set_element_handler ( callback_proc_t proc)

Definition at line 304 of file xstring.hpp.