ACE_Svc_Conf_Param Class Reference

An instance of this object will be passed down to the yyparse() and yylex() functions. More...

#include <Svc_Conf_Param.h>

Collaboration diagram for ACE_Svc_Conf_Param:

Collaboration graph
[legend]
List of all members.

Public Types

enum  SVC_CONF_PARAM_TYPE { SVC_CONF_FILE, SVC_CONF_DIRECTIVE }

Public Member Functions

 ACE_Svc_Conf_Param (ACE_Service_Gestalt *config, FILE *file)
 Constructor.

 ACE_Svc_Conf_Param (ACE_Service_Gestalt *config, const ACE_TCHAR *directive)
 Constructor.

 ~ACE_Svc_Conf_Param (void)

Public Attributes

union {
   FILE *   file
   const ACE_TCHAR *   directive
source
SVC_CONF_PARAM_TYPE type
 Discriminant use to determine which union member to use.

int yyerrno
 Keeps track of the number of errors encountered so far.

int yylineno
 Keeps track of the current line number for error-handling routine.

ace_yy_buffer_statebuffer
ACE_Obstack_T< ACE_TCHARobstack
ACE_Service_Gestaltconfig
 A reference to the configuration.


Detailed Description

An instance of this object will be passed down to the yyparse() and yylex() functions.

This is intended for internal use within ACE service configuration framework only.

This class retains the state for a given parse/scan. It primarily makes it possible to hold the static object lock in the scanner for as short a period of time as possible. The resulting finer grained locking prevents deadlocks from occuring when scanning a `svc.conf' file and activating an ACE_Task, for example, as a result of processing the directives in that file.

Definition at line 52 of file Svc_Conf_Param.h.


Member Enumeration Documentation

enum ACE_Svc_Conf_Param::SVC_CONF_PARAM_TYPE
 

Enumeration values:
SVC_CONF_FILE  The lexer will scan a file containing one or more directives.
SVC_CONF_DIRECTIVE  The lexer will scan a string containing a directive.

Definition at line 56 of file Svc_Conf_Param.h.

00057     {
00058       /// The lexer will scan a file containing one or more directives.
00059       SVC_CONF_FILE,
00060 
00061       /// The lexer will scan a string containing a directive.
00062       SVC_CONF_DIRECTIVE
00063     };


Constructor & Destructor Documentation

ACE_Svc_Conf_Param::ACE_Svc_Conf_Param ACE_Service_Gestalt config,
FILE *  file
[inline]
 

Constructor.

Definition at line 66 of file Svc_Conf_Param.h.

References buffer, obstack, source, SVC_CONF_FILE, type, yyerrno, and yylineno.

00067     : type (SVC_CONF_FILE),
00068       yyerrno (0),
00069       yylineno (1),
00070       buffer (0),
00071       obstack (),
00072       config (config)
00073   {
00074     source.file = file;
00075   }

ACE_Svc_Conf_Param::ACE_Svc_Conf_Param ACE_Service_Gestalt config,
const ACE_TCHAR directive
[inline]
 

Constructor.

Definition at line 78 of file Svc_Conf_Param.h.

References ACE_TCHAR, buffer, obstack, source, SVC_CONF_DIRECTIVE, type, yyerrno, and yylineno.

00079     : type (SVC_CONF_DIRECTIVE),
00080       yyerrno (0),
00081       yylineno (1),
00082       buffer (0),
00083       obstack (),
00084       config (config)
00085   {
00086     source.directive = directive;
00087   }

ACE_Svc_Conf_Param::~ACE_Svc_Conf_Param void   )  [inline]
 

Definition at line 89 of file Svc_Conf_Param.h.

References ace_yy_delete_buffer().

00090   {
00091     ace_yy_delete_buffer (this->buffer);
00092   }


Member Data Documentation

ace_yy_buffer_state* ACE_Svc_Conf_Param::buffer
 

Lexer buffer that corresponds to the current Service Configurator file/direct scan.

Definition at line 117 of file Svc_Conf_Param.h.

Referenced by ACE_Svc_Conf_Param(), ACE_Svc_Conf_Lexer::input(), ACE_Svc_Conf_Lexer::scan(), and ACE_Svc_Conf_Lexer::yylex().

ACE_Service_Gestalt* ACE_Svc_Conf_Param::config
 

A reference to the configuration.

Definition at line 124 of file Svc_Conf_Param.h.

Referenced by ACE_Service_Gestalt::process_directives_i().

const ACE_TCHAR* ACE_Svc_Conf_Param::directive
 

String containing directive that will be scanned and parsed.

Definition at line 102 of file Svc_Conf_Param.h.

FILE* ACE_Svc_Conf_Param::file
 

FILE stream from which directives will be scanned and parsed.

Definition at line 99 of file Svc_Conf_Param.h.

ACE_Obstack_T<ACE_TCHAR> ACE_Svc_Conf_Param::obstack
 

Obstack used for efficient memory allocation when parsing/scanning a service configurator directive.

Definition at line 121 of file Svc_Conf_Param.h.

Referenced by ACE_Svc_Conf_Param(), and ACE_Svc_Conf_Lexer::scan().

union { ... } ACE_Svc_Conf_Param::source
 

Referenced by ACE_Svc_Conf_Param(), ACE_Svc_Conf_Lexer::input(), and ACE_Service_Gestalt::process_directives_i().

SVC_CONF_PARAM_TYPE ACE_Svc_Conf_Param::type
 

Discriminant use to determine which union member to use.

Definition at line 107 of file Svc_Conf_Param.h.

Referenced by ACE_Svc_Conf_Param(), ACE_Svc_Conf_Lexer::input(), and ACE_Service_Gestalt::process_directives_i().

int ACE_Svc_Conf_Param::yyerrno
 

Keeps track of the number of errors encountered so far.

Definition at line 110 of file Svc_Conf_Param.h.

Referenced by ACE_Svc_Conf_Param(), ACE_Svc_Conf_Lexer::input(), ACE_Service_Gestalt::process_directives_i(), ACE_Svc_Conf_Lexer::scan(), and ACE_Svc_Conf_Lexer::yylex().

int ACE_Svc_Conf_Param::yylineno
 

Keeps track of the current line number for error-handling routine.

Definition at line 113 of file Svc_Conf_Param.h.

Referenced by ACE_Svc_Conf_Param(), ACE_Svc_Conf_Lexer::input(), ACE_Svc_Conf_Lexer::scan(), and ACE_Svc_Conf_Lexer::yylex().


The documentation for this class was generated from the following file:
Generated on Thu Nov 9 11:30:37 2006 for ACE by doxygen 1.3.6