Personal tools
You are here: Home Projects C++ Cfront releases Release 3.0.3 source incl-master const-headers g2tree.h
Document Actions

g2tree.h

by Michael L Powell last modified 2007-01-26 03:20

Click here to get the file

Size 1.6 kB - File type text/plain

File contents

/*ident	"@(#)G2++:incl/g2tree.h	3.1" */
/******************************************************************************
*
* C++ Standard Components, Release 3.0.
*
* Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc.
* Copyright (c) 1988, 1989, 1990 AT&T.  All Rights Reserved.
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System
* Laboratories, Inc.  The copyright notice above does not evidence
* any actual or intended publication of such source code.
*
******************************************************************************/

#ifndef G2TREEH
#define G2TREEH

#include <Block.h>
#include <String.h>

struct G2NODE{
    String 	name;
    String 	val;
    G2NODE* 	next;     // next sibling 
    G2NODE* 	child;    // firstborn 

//  The following were needed to fix inline problems

    G2NODE();
    ~G2NODE();
};

struct G2BUF{
    int			tattoo; // distinguishing mark (G2MOTHER_ATTLC) 
    G2NODE* 		root;   // the real thing
    G2NODE* 		base;   // node buffer base
    G2NODE* 		ptr;    // node buffer ptr (post-increment)
    G2NODE* 		end;   	// node buffer guard
    Block<G2NODE> 	buf;	// node buffer
};

//  The following routines provide a functional interface
//  to G2BUFs that may be used as as alternative to
//  direct manipulation.

inline G2NODE* g2root_ATTLC( G2BUF* gbuf )
{
    return gbuf->root;
}

inline String g2name_ATTLC( G2NODE* gp )
{
    return gp->name;
}

inline String g2val_ATTLC( G2NODE* gp )
{
    return gp->val;
}

G2NODE* g2child_ATTLC( G2NODE* parent );
G2NODE* g2next_ATTLC( G2NODE* parent );
G2NODE* g2anext_ATTLC( G2NODE* parent );
G2NODE* g2achild_ATTLC( G2NODE* parent );

#endif
« July 2014 »
Su Mo Tu We Th Fr Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: