[omniORB] omniORB4 forward decls

Lars Immisch lars@ibp.de
Thu, 28 Jun 2001 16:19:04 +0200


--NeXT-Mail-218150046-8
Content-Type: text/enriched; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Dear all,


I am testing omniORB4. I was delighted to get a warning when I used an
anonymous sequence for a recursive structure, but when I fixed my idl, I
got a traceback boiling down to: AttributeError: PythonVisitor has no
attribute 'visitStructForward'.

<nofill>
I have appended the offending idl.

Are you interested in bug reports like this at this stage?

- Lars

</nofill>
--NeXT-Mail-218150046-8
Content-Type: application/octet-stream; name=kvset.idl; x-unix-mode=0664
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=kvset.idl

// kvset.idl
// $Id: kvset.idl,v 1.7 2001/01/26 16:08:07 roger Exp $

#ifndef ECTF_KVSET_INCLUDED
#define ECTF_KVSET_INCLUDED

#pragma prefix "ectf.org"

/** \defgroup kvset Key Value Sets
*/

module ECTF
{
	typedef long 				S3int;
	typedef boolean  			S3bool;

	/** The S3status enumeration from S.100.
	*/
	enum S3status {
		statusOK,
		statusWarning,
		statusStarted,
		statusFail,
		statusFatal,
		statusDestroy 
	};

	/** The S3symbol is a bit field, 32 bits wide
	*/
	typedef unsigned long		S3symbol;
	typedef octet				S3byte;

	/** The S3time semantics are currently undefined - 
		but we need a resolution of at 
		least milliseconds.
	*/
	typedef long /*long*/			S3time;

	/** The definition for an integer range from S.100
	*/
	struct S3irange { 
		S3int lower; 
		S3int upper; 
	};

	typedef string					S3string;

	typedef sequence<S3string>		S3stringSeq;
	typedef sequence<S3int>			S3intSeq;
	typedef sequence<S3bool>		S3boolSeq;
	typedef sequence<S3status>		S3statusSeq;
	typedef sequence<S3symbol>		S3symbolSeq;
	typedef sequence<S3byte>		S3byteSeq;
	typedef sequence<S3irange>		S3irangeSeq;
	// S3kvsSeq is defined later

	/** \ingroup kvset
		The S3kvsType holds all possible Value Types that can go into a S3kvs
	*/
	enum S3kvsType {
		// scalar types
		ctkvs_valtypINT,
		ctkvs_valtypBOOL,
		ctkvs_valtypSESSION,
		ctkvs_valtypGRP,
		ctkvs_valtypCONF,
		ctkvs_valtypSYMBOL,
		ctkvs_valtypSTATUS,
		ctkvs_valtypAPP,
		ctkvs_valtypTIME,
		// nonscalar types
		ctkvs_valtypIRANGE,
		ctkvs_valtypKVS,
		ctkvs_valtypSTRING,
		// array types
		ctkvs_valtypINTARRAY,
		ctkvs_valtypBOOLARRAY,
		ctkvs_valtypIRANGEARRAY,
		ctkvs_valtypKVSARRAY,
		ctkvs_valtypBYTEARRAY,
		ctkvs_valtypSTRINGARRAY,
		ctkvs_valtypSYMBOLARRAY
	};

	// forward declaration
	struct S3kvPair;
	/** \ingroup kvset
		The S3kvs definition does not enforce uniqueness of Keys.
		It is simply a sequence of S3kvsPairs */
	typedef sequence<S3kvPair> S3kvs;
	typedef sequence<S3kvs> S3kvsSeq;

	/** \ingroup kvset
		A KVSet is a set of pairs containing key and value.
	*/
	struct S3kvPair {

		/** The Key of a KVSet is a S3symbol
		*/
		S3symbol key;

		/** \union KVSValue
			The Value of a KVSet is a union holding the type and the value
		*/
		union S3kvsValue switch(S3kvsType) 
		{
		case ctkvs_valtypINT:				S3int int_; 
		case ctkvs_valtypBOOL:				S3bool bool_;
		case ctkvs_valtypSESSION:			S3int session_;
		case ctkvs_valtypSYMBOL:			S3symbol symbol_;
		case ctkvs_valtypSTATUS:			S3status status_; 
		case ctkvs_valtypTIME:				S3time time_; 
		case ctkvs_valtypIRANGE:			S3irange irange_;
		case ctkvs_valtypKVS:				S3kvs kvs_;
		case ctkvs_valtypSTRING:			S3string string_; 
		case ctkvs_valtypINTARRAY:			S3intSeq intSeq_;
		case ctkvs_valtypBOOLARRAY:			S3boolSeq boolSeq_;
		case ctkvs_valtypBYTEARRAY:			S3byteSeq byteSeq_;
		case ctkvs_valtypIRANGEARRAY:		S3irangeSeq irangeSeq_;
		case ctkvs_valtypKVSARRAY:			S3kvsSeq kvsSeq_; 
		case ctkvs_valtypSTRINGARRAY:		S3stringSeq stringSeq_;
		case ctkvs_valtypSYMBOLARRAY:		S3symbolSeq symbolSeq_;
		} value;
	};
};

#endif

--NeXT-Mail-218150046-8--