Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACEXML_Entity_Manager Class Reference

Class to manage and resolve entity references. More...

#include "ACEXML/parser/parser/Entity_Manager.h"

Collaboration diagram for ACEXML_Entity_Manager:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACEXML_Entity_Manager (void)
 Default constructor. More...

 ~ACEXML_Entity_Manager (void)
 Destructor. More...

int add_entity (const ACEXML_Char *ref, const ACEXML_Char *value)
 Add a new entity declaration. More...

const ACEXML_Stringresolve_entity (const ACEXML_Char *ref)
 Resolve an entity reference. More...


Private Attributes

ACEXML_ENTITIES_MANAGER entities_

Detailed Description

Class to manage and resolve entity references.

Todo:
Fill in details for this class.

Definition at line 55 of file Entity_Manager.h.


Constructor & Destructor Documentation

ACEXML_Entity_Manager::ACEXML_Entity_Manager void   
 

Default constructor.

Definition at line 20 of file Entity_Manager.cpp.

References ACEXML_String, amp_name, amp_value, apos_name, apos_value, ACE_Hash_Map_Manager_Ex< ACEXML_String, ACEXML_String, ACE_Hash< ACEXML_String >, ACE_Equal_To< ACEXML_String >, ACE_Null_Mutex >::bind, entities_, gt_name, gt_value, lt_name, lt_value, quot_name, and quot_value.

00021   : entities_ ()
00022 {
00023   // @@ No way to know if these bindings succeed or not.
00024 
00025   ACEXML_String ampname (amp_name, 0, 0);
00026   ACEXML_String ampvalue  (amp_value, 0, 0);
00027   this->entities_.bind (ampname, ampvalue);
00028 
00029   ACEXML_String ltname (lt_name, 0, 0);
00030   ACEXML_String ltvalue  (lt_value, 0, 0);
00031   this->entities_.bind (ltname, ltvalue);
00032 
00033   ACEXML_String gtname (gt_name, 0, 0);
00034   ACEXML_String gtvalue  (gt_value, 0, 0);
00035   this->entities_.bind (gtname, gtvalue);
00036 
00037   ACEXML_String aposname (apos_name, 0, 0);
00038   ACEXML_String aposvalue  (apos_value, 0, 0);
00039   this->entities_.bind (aposname, aposvalue);
00040 
00041   ACEXML_String quotname (quot_name, 0, 0);
00042   ACEXML_String quotvalue  (quot_value, 0, 0);
00043   this->entities_.bind (quotname, quotvalue);
00044 }

ACEXML_Entity_Manager::~ACEXML_Entity_Manager void   
 

Destructor.

Definition at line 46 of file Entity_Manager.cpp.

00047 {
00048 }


Member Function Documentation

ACEXML_INLINE int ACEXML_Entity_Manager::add_entity const ACEXML_Char   ref,
const ACEXML_Char   value
 

Add a new entity declaration.

Definition at line 4 of file Entity_Manager.i.

References ACEXML_Char, ACEXML_String, ACE_Hash_Map_Manager_Ex< ACEXML_String, ACEXML_String, ACE_Hash< ACEXML_String >, ACE_Equal_To< ACEXML_String >, ACE_Null_Mutex >::bind, and entities_.

00006 {
00007   ACEXML_String name (ref, 0, 0);
00008   ACEXML_String value  (v, 0, 0);
00009   return this->entities_.bind (name, value);
00010 }

ACEXML_INLINE const ACEXML_String * ACEXML_Entity_Manager::resolve_entity const ACEXML_Char   ref
 

Resolve an entity reference.

Definition at line 13 of file Entity_Manager.i.

References ACEXML_Char, ACEXML_String, entities_, ACE_Hash_Map_Manager_Ex< ACEXML_String, ACEXML_String, ACE_Hash< ACEXML_String >, ACE_Equal_To< ACEXML_String >, ACE_Null_Mutex >::find, and ACE_Hash_Map_Entry< ACEXML_String, ACEXML_String >::int_id_.

00014 {
00015   ACEXML_ENTITY_ENTRY *entry;
00016 
00017   if (this->entities_.find (ACEXML_String (ref, 0, 0),
00018                             entry) == 0)
00019     return &entry->int_id_;
00020   return 0;
00021 }


Member Data Documentation

ACEXML_ENTITIES_MANAGER ACEXML_Entity_Manager::entities_ [private]
 

Definition at line 72 of file Entity_Manager.h.

Referenced by ACEXML_Entity_Manager, add_entity, and resolve_entity.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:26:59 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002