/*	NibList - A program to list the contents of nib files.
    Copyright (C) 1991  Oceania Healthcare Systems

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 1, or (at your option)
    any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program, in a file called COPYING; if not, write to
	the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#import	"Categories.h"
#import "NibFile.h"

char	cbuff[1024];

@implementation Object (ObjectDumper)
- dump:dest
{
	[dest print:[self name]];
	[dest print:":"];
	return self;
}
@end

@implementation List (ListDumper)
- dump:dest
{
	unsigned	count = [self count], i;
	
	[super dump:dest];
	sprintf( cbuff, "Contains %d entries\n", count);
	[dest printTab:cbuff];
	for( i = 0;  i < count;  i++ )
	{
		[dest dumpObj:[self objectAt:i]];
		[dest print:"\n"];
	}
	return self;
}
@end

@implementation View (ViewDumper)
- dump:dest
{
	[super dump:dest];
	sprintf( cbuff, "{%1.0f,%1.0f,%1.0f,%1.0f}", frame.origin.x, frame.origin.y,
				frame.size.width, frame.size.height);
	[dest print:cbuff];
	return self;
}
@end

