Ada Programming/Libraries/Container/Booch

From Wikibooks, open books for an open world
Jump to: navigation, search

Ada Lovelace 1838.jpg

Library functions[edit]

Bags[edit]

Collections[edit]

Ordered[edit]

Dequeues[edit]

Graphs[edit]

Directed[edit]

Undirected[edit]

Lists[edit]

Single[edit]

Double[edit]

Maps[edit]

Queues[edit]

Ordered[edit]

Rings[edit]

Sets[edit]

Stacks[edit]

Trees[edit]

AVL[edit]

Binary[edit]

Multiway[edit]

Library links[edit]

Author  
Simon Wright
Homepage  
http://booch95.sourceforge.net
Tutorial  
http://booch95.sourceforge.net/case-study.html
Project Info 
http://sourceforge.net/projects/booch95
CVS Archive  
http://sourceforge.net/cvs/?group_id=135616
Download  
http://sourceforge.net/project/showfiles.php?group_id=135616

Sample code[edit]

Read the project tutorial for full detail.

with Ada.Calendar;
with Ada.Strings.Bounded;

package Cars is

   package Plate_Strings
     is new Ada.Strings.Bounded.Generic_Bounded_Length (10);
   
   subtype Plate_String is Plate_Strings.Bounded_String;

   package Model_Strings
     is new Ada.Strings.Bounded.Generic_Bounded_Length (32);
   
   subtype Model_String is Model_Strings.Bounded_String;

   type Car is 
      record
         Plate : Plate_String;
         Model : Model_String;
         Registered : Ada.Calendar.Time;
      end record;

end Cars;
with BC.Containers.Collections.Bounded;
with Cars;
package My_Fleet_Combined is

   use type Cars.Car;

   package Abstract_Car_Containers 
     is new BC.Containers (Cars.Car);

   package Abstract_Car_Collections 
     is new Abstract_Car_Containers.Collections;

   package Fleets 
     is new Abstract_Car_Collections.Bounded (Maximum_Size => 30);

   The_Fleet : Fleets.Collection;

end My_Fleet_Combined;

See also[edit]

Wikibook[edit]

Ada Reference Manual[edit]

-- none apply --