2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: GenericId.cc /main/5 1996/07/18 16:14:18 drk $ */
25 /* exported interfaces */
26 #include "GenericId.h"
28 /* imported interfaces */
39 //-------------------------------------------------------------------------
40 GenericId::GenericId( const Token &t,
42 ActionType mode ):BaseData(t,mode)
45 DBUG_PRINT("GenericId", (" name = %s", SGMLName::lookup(name)) );
53 //-------------------------------------------------------------------------
55 GenericId::markup( const Token &t )
58 DBUG_PRINT( "GenericId", (" token t = %s",SGMLName::lookup(t.Gi()) ) );
61 if ( ignore_status && !Dispatch::OutsideIgnoreScope() ) {
69 if ( t.type() == START ) {
71 /* first time we see the GI */
72 if ( t.Gi() == giname && f_base < 0 && !done ) {
74 /* fork off the OL_Data class for this GI */
75 f_data = new OL_Data ( t, OLAF::OL_data, (ActionType)ignore_status );
76 assert ( f_data != NULL );
82 else if ( t.type() == END ) {
84 if ( f_base == t.level() && !done ) {
86 if ( data_complete = f_data->DataIsComplete() ) {
87 ValueBuffer.writeStr( f_data->content() );
90 delete f_data; f_data = NULL;
100 //-------------------------------------------------------------------------
102 GenericId::data( const char *str, size_t sz )
104 if ( ignore_status && !Dispatch::OutsideIgnoreScope() ) {
110 f_data->data( str, sz );