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 Member Functions

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 42 of file ContentHandler_Test.cpp.

References ACE_ERROR, ACE_TEXT, ACEXML_Char, ACEXML_THROW, LM_ERROR, and ACE_OS::strlen().

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

const ACEXML_Char* Basic_Content_Tester::get_test_string void   )  [inline]
 

Definition at line 29 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>")

Definition at line 36 of file ContentHandler_Test.cpp.

Referenced by get_test_string().


The documentation for this class was generated from the following file:
Generated on Thu Nov 9 11:48:18 2006 for ACEXML by doxygen 1.3.6