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

Basic_Content_Tester Class Reference

Inheritance diagram for Basic_Content_Tester:

Inheritance graph
[legend]
Collaboration diagram for Basic_Content_Tester:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual void characters (const ACEXML_Char *ch, int start, int length ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException))
const ACEXML_Charget_test_string (void)

Static Private Attributes

const ACEXML_Chartest_string_

Member Function Documentation

void Basic_Content_Tester::characters const ACEXML_Char   ch,
int    start,
int length    ACEXML_ENV_ARG_DECL
[virtual]
 

Receive notification of character data.

Reimplemented from ACEXML_DefaultHandler.

Definition at line 40 of file ContentHandler_Test.cpp.

References ACE_ERROR, ACE_TEXT, ACEXML_Char, ACEXML_ENV_ARG_DECL, ACEXML_THROW, and LM_ERROR.

00044 {
00045   static int already_called = 0;
00046   static const ACEXML_Char *expect =
00047     ACE_TEXT ("Example\nd'internationalisation");
00048 
00049   if (already_called)
00050     {
00051       ACEXML_THROW (ACEXML_SAXException
00052                     (ACE_TEXT ("characters() called too much\n")));
00053     }
00054   already_called = 1;
00055 
00056   int expected_len = ACE_static_cast (int, ACE_OS::strlen (expect));
00057   if (length != expected_len)
00058     {
00059       ACE_ERROR ((LM_ERROR,
00060                   ACE_TEXT ("characters() expected len %d (%*s); ")
00061                   ACE_TEXT ("got %d (%*s)\n"),
00062                   expected_len, expected_len, ch + start,
00063                   length, length, ch + start));
00064       ACEXML_THROW (ACEXML_SAXException (ACE_TEXT ("Functionality failure")));
00065     }
00066   return;
00067 }

const ACEXML_Char* Basic_Content_Tester::get_test_string void    [inline]
 

Definition at line 27 of file ContentHandler_Test.cpp.

References ACEXML_Char, and test_string_.


Member Data Documentation

const ACEXML_Char * Basic_Content_Tester::test_string_ [static, private]
 

Initial value:



  ACE_TEXT ("d&apos;internationalisation</translation></xml>")

Definition at line 34 of file ContentHandler_Test.cpp.

Referenced by get_test_string.


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