diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-08-11 07:55:48 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-08-11 07:55:48 +0000 |
commit | c4b8e1e0b04ff0679cd4976829bed6e55485b127 (patch) | |
tree | eaa9f6f87c9b1946739838d12e9e9a295ce6f702 /CIAO | |
parent | 8b37692849021e70dcee63fbeb09affd30d82075 (diff) | |
download | ATCD-c4b8e1e0b04ff0679cd4976829bed6e55485b127.tar.gz |
Diffstat (limited to 'CIAO')
-rw-r--r-- | CIAO/tools/Config_Handlers/XMLSchema/id_map.hpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/CIAO/tools/Config_Handlers/XMLSchema/id_map.hpp b/CIAO/tools/Config_Handlers/XMLSchema/id_map.hpp index ae4f8e8f7d7..2af5548f1c1 100644 --- a/CIAO/tools/Config_Handlers/XMLSchema/id_map.hpp +++ b/CIAO/tools/Config_Handlers/XMLSchema/id_map.hpp @@ -1,20 +1,21 @@ // -*- C++ -*- +// $Id$ //============================================================================= /** * @file id_map.hpp * * This file contains the ID_Map class which has the responsibility of linking - * XML IDREF objects to their XML ID counterparts. In the output files, this - * means that a <IDREF name>_ptr() will return a pointer to the identified + * XML IDREF objects to their XML ID counterparts. In the output files, this + * means that a <IDREF name>_ptr() will return a pointer to the identified * object. - * + * * Exception NULL_PTR_Entry is thrown when a program attempts to add a NULL_PTR - * to either the id_map or idref_map. - * + * to either the id_map or idref_map. + * * Exception Unresolved_IDREF is thrown if an element in an XML document attempts * to reference an ID that does not exist. - * + * * @author Jason R. Cody <jason.r.cody@vanderbilt.edu; jason.r.cody@gmail.com> */ //============================================================================= @@ -52,8 +53,8 @@ //NULL_PTR_Entry thrown when a NULL PTR is added to the //ID_Map class NULL_PTR_Entry {}; - - //Unresolved_IDREF thrown when there are IDREF's in the + + //Unresolved_IDREF thrown when there are IDREF's in the //XML document. class Unresolved_IDREF {}; @@ -89,14 +90,14 @@ { this->idref_map_.insert(IDREF_MAP::value_type (idref, obj_ref)); } - else + else { throw NULL_PTR_Entry(); } return; } - //Sets the referencing elements XSCRT::Type::idref_ to point to the + //Sets the referencing elements XSCRT::Type::idref_ to point to the //referenced element. //Note: The pointer is of type "XSCRT::Type*" void resolve_idref ( void ) @@ -105,7 +106,7 @@ ID_MAP::iterator id_iterator; IDREF_MAP::iterator idref_iterator; - for (idref_iterator = this->idref_map_.begin(); + for (idref_iterator = this->idref_map_.begin(); idref_iterator != this->idref_map_.end(); ++idref_iterator) { @@ -113,7 +114,7 @@ id_iterator = this->id_map_.find(idref_iterator->first); if (id_iterator != this->id_map_.end()) { - //Add the IDREF identifier and the reference to the + //Add the IDREF identifier and the reference to the //identified object std::basic_string<ACE_TCHAR> temp_id = id_iterator->first; idref_iterator->second->set_idref(temp_id, id_iterator->second); @@ -128,7 +129,7 @@ private: //id_map_: maps the ID string to the element with the // ID attribute - //idref_map_: multimap that maps the IDREF string to the + //idref_map_: multimap that maps the IDREF string to the // element with the IDREF attribute ID_MAP id_map_; IDREF_MAP idref_map_; |