GtkSharp/generator/Statistics.cs
Rachel Hestilow 4d92d54b3f 2002-07-25 Rachel Hestilow <hestilow@ximian.com>
[about 60% of the marshalling patch that I lost.
	 The rest to come tomorrow.]

	* generator/BoxedGen.cs, StructGen.cs: Move most of this to StructBase,
	delete large chunks duplicated from ClassBase.

	* generator/IGeneratable.cs: Add MarshalReturnType, FromNativeReturn.

	* generator/ClassBase.cs: Move ctor stuff here. Add a CallByName
	overload with no parameters for the "self" reference.

	* generator/EnumGen.cs, CallbackGen.cs: Implement new MarshalReturnType,
	  FromNativeReturn.

   * generator/Method.cs: Use container_type.MarshalType, CallByName, and
	  SymbolTable.FromNativeReturn when generating call and import sigs.

	* generator/OpaqueGen.cs: Added.

	* generator/Property.cs: Handle boxed and opaques differently.

	* generator/SymbolTable.cs: Update for the opaque stuff and the new Return
	methods. Also change GetClassGen to simply call the as operator.

	* glib/Boxed.cs: Update for struct usage -- this is now a wrapper for
	  the purposes of using with Value.

   * glib/Opaque.cs: Added. New base class for opaque structs.

	* glue/textiter.c, gtk/TextIter.custom: Remove.

	* gnome/Program.cs: Update for new struct marshalling.

	* parser/Metadata.pm: Use our own getChildrenByTagName.

	* parser/README: Update for new requirements (was out of sync with
	  build.pl)

	* parser/gapi2xml.pl: Hide struct like const in field elements.

	* parser/gapi_pp.pl: Handle embedded union fields (poorly).

	* sample/test/TestColorSelection.cs: Comment out null color tests
     for now.

svn path=/trunk/gtk-sharp/; revision=6186
2002-07-26 06:08:52 +00:00

164 lines
2.9 KiB
C#

// Statistics.cs : Generation statistics class implementation
//
// Author: Mike Kestner <mkestner@speakeasy.net>
//
// <c> 2002 Mike Kestner
namespace GtkSharp.Generation {
using System;
using System.Collections;
public class Statistics {
static int cbs = 0;
static int enums = 0;
static int objects = 0;
static int structs = 0;
static int boxed = 0;
static int opaques = 0;
static int interfaces = 0;
static int methods = 0;
static int ctors = 0;
static int props = 0;
static int sigs = 0;
static int throttled = 0;
static int ignored = 0;
public static int CBCount {
get {
return cbs;
}
set {
cbs = value;
}
}
public static int EnumCount {
get {
return enums;
}
set {
enums = value;
}
}
public static int ObjectCount {
get {
return objects;
}
set {
objects = value;
}
}
public static int StructCount {
get {
return structs;
}
set {
structs = value;
}
}
public static int BoxedCount {
get {
return boxed;
}
set {
boxed = value;
}
}
public static int OpaqueCount {
get {
return opaques;
}
set {
opaques = value;
}
}
public static int CtorCount {
get {
return ctors;
}
set {
ctors = value;
}
}
public static int MethodCount {
get {
return methods;
}
set {
methods = value;
}
}
public static int PropCount {
get {
return props;
}
set {
props = value;
}
}
public static int SignalCount {
get {
return sigs;
}
set {
sigs = value;
}
}
public static int IFaceCount {
get {
return interfaces;
}
set {
interfaces = value;
}
}
public static int ThrottledCount {
get {
return throttled;
}
set {
throttled = value;
}
}
public static int IgnoreCount {
get {
return ignored;
}
set {
ignored = value;
}
}
public static void Report()
{
Console.WriteLine("Generation Summary:");
Console.WriteLine("\tEnums: " + enums);
Console.WriteLine("\tStructs: " + structs);
Console.WriteLine("\tBoxed: " + boxed);
Console.WriteLine("\tOpaques: " + opaques);
Console.WriteLine("\tInterfaces: " + interfaces);
Console.WriteLine("\tCallbacks: " + cbs);
Console.WriteLine("\tObjects: " + objects);
Console.WriteLine("\tProperties: " + props);
Console.WriteLine("\tSignals: " + sigs);
Console.WriteLine("\tMethods: " + methods);
Console.WriteLine("\tConstructors: " + ctors);
Console.WriteLine("\tThrottled: " + throttled);
Console.WriteLine("\tIgnored: " + ignored);
Console.WriteLine("Total Nodes: " + (enums+structs+boxed+opaques+interfaces+cbs+objects+props+sigs+methods+ctors+throttled+ignored));
}
}
}