#include <LCD_DocumentImpl.hh>
Inheritance diagram for LCD_DocumentImpl:


Public Member Functions | |
| void | registerListener (LCD_DocListener *ls) |
| int | deleteListener (LCD_DocListener *ls) |
| void | notifyListeners () |
| XERCES_CPP_NAMESPACE::DOM_Element | getElement (XERCES_CPP_NAMESPACE::DOMString id, XERCES_CPP_NAMESPACE::DOMString elementName=XERCES_CPP_NAMESPACE::DOMString("*")) const |
Private Member Functions | |
| LCD_DocumentImpl (std::string XMLfilespec) | |
| void | parse () |
Private Attributes | |
| std::string | filespec |
| std::list< LCD_DocListener * > * | listeners |
| Timestamp | firstRead |
| Timestamp | lastMod |
| XERCES_CPP_NAMESPACE::DOMParser * | parser |
| LCD_DocErrorReporter * | errReporter |
Friends | |
| class | LCD_DocManager |
|
|
Definition at line 61 of file LCD_DocumentImpl.cc. References errReporter, filespec, listeners, and parser.
00061 {
00062 // This method should only be invoked by the LCD_DocManager
00063 DOM_Element elt;
00064
00065 errReporter = new LCD_DocErrorReporter();
00066
00067 parser = new DOMParser();
00068 parser->setErrorHandler(errReporter);
00069
00070 listeners = new std::list<LCD_DocListener*>;
00071 filespec = XMLfilespec;
00072 }
|
|
|
Implements LCD_Document. Definition at line 151 of file LCD_DocumentImpl.cc. References listeners.
00151 {
00152
00153 std::list<LCD_DocListener*>::iterator
00154 which = std::find(listeners->begin(), listeners->end(), ls);
00155 if (which != listeners->end()) {
00156
00157 // delete it from list
00158 listeners->erase(which);
00159 }
00160 else {
00161 return 1; // not found
00162 }
00163 return 0;
00164 }
|
|
||||||||||||
|
Implements LCD_Document. |
|
|
Implements LCD_Document. Definition at line 171 of file LCD_DocumentImpl.cc.
00171 {
00172 // fetch listeners; invoke handler for each
00173 return;
00174 }
|
|
|
Definition at line 79 of file LCD_DocumentImpl.cc. References LCD_Document::descrip, LCD_Document::docTypeName, filespec, firstRead, LCD_Document::myDoc, and parser. Referenced by LCD_DocManager::makeDocument().
00079 {
00080
00081 // static const DOMString& descripString = DOMString("descrip");
00082 const DOMString& descripString = DOMString("descrip");
00083 DOM_Element elt;
00084
00085 parser->parse(filespec.c_str());
00086 myDoc = parser->getDocument();
00087
00088 // firstRead = getCurrentTime(); to be defined
00089 firstRead = 0;
00090
00091 elt = myDoc.getDocumentElement();
00092
00093 // dtd doctype name must match tag name of root element of doc
00094 docTypeName = elt.getTagName();
00095
00096 descrip = elt.getAttribute(descripString);
00097
00098 }
|
|
|
Implements LCD_Document. Definition at line 144 of file LCD_DocumentImpl.cc. References listeners.
00144 {
00145 listeners->push_front(ls);
00146 }
|
|
|
Definition at line 39 of file LCD_DocumentImpl.hh. |
|
|
Definition at line 56 of file LCD_DocumentImpl.hh. Referenced by LCD_DocumentImpl(), and LCD_DocManager::makeDocument(). |
|
|
Definition at line 49 of file LCD_DocumentImpl.hh. Referenced by LCD_DocumentImpl(), and parse(). |
|
|
Definition at line 52 of file LCD_DocumentImpl.hh. Referenced by parse(). |
|
|
Definition at line 53 of file LCD_DocumentImpl.hh. |
|
|
Definition at line 50 of file LCD_DocumentImpl.hh. Referenced by deleteListener(), LCD_DocumentImpl(), and registerListener(). |
|
|
Definition at line 55 of file LCD_DocumentImpl.hh. Referenced by LCD_DocumentImpl(), and parse(). |
1.3.4