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

ACE_Svc_Conf_Lexer_Guard Class Reference

"Guard" that ensures lexer buffer stack manipulation is exception-safe. More...

#include <Svc_Conf_Lexer_Guard.h>

List of all members.

Public Methods

 ACE_Svc_Conf_Lexer_Guard (FILE *file)
 Constructor. More...

 ACE_Svc_Conf_Lexer_Guard (const ACE_TCHAR *directive)
 Constructor. More...

 ~ACE_Svc_Conf_Lexer_Guard (void)
 Destructor. More...


Detailed Description

"Guard" that ensures lexer buffer stack manipulation is exception-safe.

Buffers are allocated and deallocated when scanning a file or a string. This class utilizes the "guard" idiom to perform stack pushing and popping before and after parsing/scanning.

The underlying stack allows nested scans to occur. For example, while scanning a `svc.conf' file, a Service Object's init() method could invoke a Service Configurator directive, which would require "moving" the current lexer state out of the way (pushing it onto the stack implementation).


Constructor & Destructor Documentation

ACE_Svc_Conf_Lexer_Guard::ACE_Svc_Conf_Lexer_Guard ( FILE * file ) [inline]
 

Constructor.

Create a new buffer to be used when scanning a new Service Configurator file, push it onto the underlying buffer stack, and make it the current buffer.

ACE_Svc_Conf_Lexer_Guard::ACE_Svc_Conf_Lexer_Guard ( const ACE_TCHAR * directive )
 

Constructor.

Create a new buffer to be used when scanning a new Service Configurator directive, push it onto the underlying buffer stack, and make it the current buffer.

ACE_Svc_Conf_Lexer_Guard::~ACE_Svc_Conf_Lexer_Guard ( void )
 

Destructor.

Pop the current buffer off of the underlying buffer stack, and make the previous buffer (i.e. the one on the top of the stack), the current buffer.


The documentation for this class was generated from the following files:
Generated at Fri Oct 5 07:04:57 2001 for ACE by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000