Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
63
cde/programs/dtinfo/dtinfogen/infolib/etc/ConcatTask.C
Normal file
63
cde/programs/dtinfo/dtinfogen/infolib/etc/ConcatTask.C
Normal file
@@ -0,0 +1,63 @@
|
||||
/* $XConsortium: ConcatTask.C /main/3 1996/08/21 15:46:12 drk $ */
|
||||
/* exported interfaces */
|
||||
#include "ConcatTask.h"
|
||||
|
||||
/* imported interfaces */
|
||||
#include "Expression.h"
|
||||
#include "ExprList.h"
|
||||
#include "Token.h"
|
||||
#include "AttributeData.h"
|
||||
#include "Content.h"
|
||||
#include "FirstOf.h"
|
||||
#include "GenericId.h"
|
||||
#include "Literal.h"
|
||||
|
||||
Concat::Concat( const Token &t,
|
||||
ExprList *elist,
|
||||
ActionType mode):OL_Data(t, mode)
|
||||
{
|
||||
|
||||
for ( OL_Expression *eptr = elist->first();
|
||||
eptr;
|
||||
eptr = elist->next(eptr) ) {
|
||||
switch ( eptr->type() ) {
|
||||
|
||||
case REFERENCE:
|
||||
addSubTask( new AttributeData( t, eptr->name(), mode ));
|
||||
break;
|
||||
|
||||
case CONTENT:
|
||||
addSubTask( new Content(t,mode) );
|
||||
break;
|
||||
|
||||
case CONCAT:
|
||||
addSubTask( new Concat( t,
|
||||
(ExprList *)eptr->data_list(),
|
||||
mode) );
|
||||
break;
|
||||
|
||||
case FIRSTOF:
|
||||
addSubTask( new FirstOf( t,
|
||||
(ExprList *)eptr->data_list(),
|
||||
mode) );
|
||||
break;
|
||||
|
||||
case GENERIC_ID:
|
||||
addSubTask( new GenericId( t,
|
||||
eptr->name(),
|
||||
mode) );
|
||||
break;
|
||||
|
||||
case LITERAL:
|
||||
addSubTask( new Literal( t,
|
||||
( const char *)eptr->data_list(),
|
||||
mode) );
|
||||
break;
|
||||
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user