commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/appserver/src/_featuretest thekitchensink.odl


From: Daniel E. Baumann
Subject: gnue/appserver/src/_featuretest thekitchensink.odl
Date: Sun, 21 Jul 2002 09:19:23 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Daniel E. Baumann <address@hidden>      02/07/21 09:19:23

Modified files:
        appserver/src/_featuretest: thekitchensink.odl 

Log message:
        Add more to the kitchen sink.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/src/_featuretest/thekitchensink.odl.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: gnue/appserver/src/_featuretest/thekitchensink.odl
diff -c gnue/appserver/src/_featuretest/thekitchensink.odl:1.1 
gnue/appserver/src/_featuretest/thekitchensink.odl:1.2
*** gnue/appserver/src/_featuretest/thekitchensink.odl:1.1      Mon Jul 15 
02:11:24 2002
--- gnue/appserver/src/_featuretest/thekitchensink.odl  Sun Jul 21 09:19:23 2002
***************
*** 3,11 ****
  // creating the markup and schema for GODL. It will also be used to
  // test the various parsers.
  
  module GNUe
  {
!   // All possible type declarations
  
    // base types
    typedef float          Float;
--- 3,68 ----
  // creating the markup and schema for GODL. It will also be used to
  // test the various parsers.
  
+ 
+ // Stuff that belongs to the 'default' module. It is used to show you do
+ // not need to declare things in a module to have valid ODL. Also helps
+ // in determining how to handle things that are not contained in a module.
+ typedef float FloatType;
+ typedef array<float> FloatArrayType;
+ typedef sequence<float> FloatSequenceType;
+ typedef string StringType;
+ typedef GNUe::Sadist Masta;
+ 
+ struct Bar
+ {
+   string barname;
+   float barprice;
+   short barz;
+   unsigned long fubar;
+   unsigned short fbar;
+   long long bars;
+ };
+ 
+ union Trout switch(boolean)
+ {
+  case TRUE: string brown_trout;
+  case FALSE: string rainbow_trout;
+  default: string trout;
+ };
+ 
+ enum TroutType {brown, rainbow, lake};
+ 
+ typedef Bar bar;
+ typedef Trout trout_t;
+ typedef TroutType trout_type;
+ 
+ typedef dictionary<float, float> DictionaryType;
+ typedef set<float>               SetType;
+ typedef list<float>              ListType;
+ typedef bag<float>               BagType;
+ 
+ // Forward declarations
+ interface GNUe::Sadist;
+ class GNUe::Goats::Chillywilly;
+ 
+ const unsigned long BIGINT = 10000L;
+ 
+ exception NoModuleError{string what; short line; };
+ exception FubarError{};
+ 
+ interface KungFu
+ {
+   // should add some attributes, etc. here
+ };
+ 
+ class Dragon: KungFu
+ {
+   // should add some attributes, etc. here
+ };
+ 
  module GNUe
  {
!   // Type declarations
  
    // base types
    typedef float          Float;
***************
*** 17,32 ****
    typedef unsigned short UnsignedShort;
    typedef char           Char;
    typedef boolean        Bool;
!   tyepdef octet          Octet;
!   tyepdef date           Date;
    typedef time           Time;
    typedef interval       Interval;
    typedef timestamp      Timestamp;
  
    // array types
    typedef array<float>          FloatArray;
!   tyepdef array<double>         DoubleArray;
!   tyepdef array<long long>      LongLongArray;
    typedef array<long>           LongArray;
    typedef array<short>          ShortArray;
    typedef array<unsigned long>  UnsignedLongArray;
--- 74,89 ----
    typedef unsigned short UnsignedShort;
    typedef char           Char;
    typedef boolean        Bool;
!   typedef octet          Octet;
!   typedef date           Date;
    typedef time           Time;
    typedef interval       Interval;
    typedef timestamp      Timestamp;
  
    // array types
    typedef array<float>          FloatArray;
!   typedef array<double>         DoubleArray;
!   typedef array<long long>      LongLongArray;
    typedef array<long>           LongArray;
    typedef array<short>          ShortArray;
    typedef array<unsigned long>  UnsignedLongArray;
***************
*** 35,47 ****
    typedef array<boolean>        BooleanArray;
    typedef array<octet>          OctetArray;
    typedef array<date>           DateArray;
!   tyepdef array<time>           TimeArray;
    typedef array<interval>       IntervalArray;
    typedef array<timestamp>      TimestampArray;
  
    typedef sequence<float>          FloatSequence;
!   tyepdef sequence<double>         DoubleSequence;
!   tyepdef sequence<long long>      LongLongSequence;
    typedef sequence<long>           LongSequence;
    typedef sequence<short>          ShortSequence;
    typedef sequence<unsigned long>  UnsignedLongSequence;
--- 92,104 ----
    typedef array<boolean>        BooleanArray;
    typedef array<octet>          OctetArray;
    typedef array<date>           DateArray;
!   typedef array<time>           TimeArray;
    typedef array<interval>       IntervalArray;
    typedef array<timestamp>      TimestampArray;
  
    typedef sequence<float>          FloatSequence;
!   typedef sequence<double>         DoubleSequence;
!   typedef sequence<long long>      LongLongSequence;
    typedef sequence<long>           LongSequence;
    typedef sequence<short>          ShortSequence;
    typedef sequence<unsigned long>  UnsignedLongSequence;
***************
*** 50,56 ****
    typedef sequence<boolean>        BooleanSequence;
    typedef sequence<octet>          OctetSequence;
    typedef sequence<date>           DateSequence;
!   tyepdef sequence<time>           TimeSequence;
    typedef sequence<interval>       IntervalSequence;
    typedef sequence<timestamp>      TimestampSequence;
  
--- 107,113 ----
    typedef sequence<boolean>        BooleanSequence;
    typedef sequence<octet>          OctetSequence;
    typedef sequence<date>           DateSequence;
!   typedef sequence<time>           TimeSequence;
    typedef sequence<interval>       IntervalSequence;
    typedef sequence<timestamp>      TimestampSequence;
  
***************
*** 90,116 ****
  
    // Forward declarations
    interface CodeSlave;
!   class Goat;
  
!   const boolean madgoats = TRUE;
  
    // Exception declarations
!   exception WhoSaidYouCouldStopCoding{string code_slave_name; boolean 
beating; };
!   exception CodeSlaveAway{};
  
!   interface DaMasta
    {
!     enum Beating_Type{mild, profuse };
  
!     typedef Beating_Type beating_t
  
!     boolean is_watching(CodeSlave cslave);
!     void beatCodeSlave(CodeSlave cslave, beating_t severity) 
raises(CodeSlaveAway);
    };
  
!   interface CodeSlave
    {
!     // some stuff here
      void stopCoding() raises(WhoSaidYouCouldStopCoding);
    };
  
--- 147,205 ----
  
    // Forward declarations
    interface CodeSlave;
!   class Goats::Goat;
  
!   const boolean MADGOATS = TRUE;
  
    // Exception declarations
!   exception FooError{};
!   exception BarError{string biz; char bar; float baz; };
! 
!   interface Sadist
!   {
!     void torture();
!   };
! 
!   interface Masochist
!   {
!     void suffer();
!   };
  
!   interface DaMasta: Sadist
    {
!     enum BeatingType{mild, profuse};
! 
!     typedef BeatingType beating_t
! 
!     const string FAVCOLOR = "red";
! 
!     exception CodeSlaveAway{};
!     exception NoTicketsAssigned{};
! 
!     readonly attribute string favoriteColor;
!     attribute unsigned short bugReports;
!     attribute beating_t beating;
  
!     relationship set<CodeSlave> beats inverse CodeSlave::isBeaten;
  
!     relationship Hacker assginsTicket 
!                inverse Hacker::isAssignedTicketBy;
! 
!     oneway void speakInIRCChannel(); // hehe :), no reply as da masta rambles 
!                                      // on, hence this is a "oneway" 
operation.
!     boolean isWatching(in CodeSlave cslave);
!     void beatCodeSlave(in CodeSlave cslave, inout beating_t severity) 
!                                                          
raises(CodeSlaveAway);
!     boolean getTickets(in Hacker goat, out unsigned short tickets) 
!                                                     raises 
(NoTicketsAssigned);
    };
  
!   interface CodeSlave: Masochist
    {
!     exception WhoSaidYouCouldStopCoding{string cslave_name; boolean beating};
! 
!     relationship GNUe::DaMasta isBeaten inverse GNUe::DaMasta::beats;
! 
      void stopCoding() raises(WhoSaidYouCouldStopCoding);
    };
  
***************
*** 121,127 ****
    {
      class Goat: GNUe::CodeSlave
      {
!       attribute boolean madGoatRaped = GNUe::madgoats;
        
      };
  
--- 210,219 ----
    {
      class Goat: GNUe::CodeSlave
      {
!       attribute boolean madGoatRaped = GNUe::MADGOATS;
! 
!       relationship GNUe::DaMasta isAssignedTicketBy
!                       inverse GNUe::DaMasta assignsTicket;
        
      };
  
***************
*** 136,141 ****
      {
        void consumeDonut(in DonutType donut);
      };
    };
  
! };
\ No newline at end of file
--- 228,239 ----
      {
        void consumeDonut(in DonutType donut);
      };
+ 
+     class Jamest extends Goat
+     ( extent goats)
+     {
+       void consumeAtmosphericCrack();
+     };
    };
  
! };



reply via email to

[Prev in Thread] Current Thread [Next in Thread]