Index: /trunk/MacFaceLibrary/Face.cs
===================================================================
--- /trunk/MacFaceLibrary/Face.cs	(revision 12)
+++ /trunk/MacFaceLibrary/Face.cs	(revision 12)
@@ -0,0 +1,123 @@
+using System;
+
+namespace MacFace
+{
+	/// <summary>
+	/// Face ÌTvÌà¾Å·B
+	/// </summary>
+	public class Face
+	{
+		public Face()
+		{
+			// 
+			// TODO: RXgN^ WbNð±±ÉÇÁµÄ­¾³¢B
+			//
+		}
+	}
+}
+
+/*
+#import <Cocoa/Cocoa.h>
+#import "HostStatistics.h"
+#import "FaceDef.h"
+
+@interface Face : NSObject
+{
+    FaceDef *faceDef;
+    NSImage *image;
+    int health;
+    int activity;
+    int pageout;
+    unsigned marker;
+    NSDate *pageoutDate;
+}
+
+- (id)initWithDefinition:(FaceDef*)def;
+
+- (int)activity;
+- (int)health;
+- (NSImage*)image;
+- (FaceDef*)definition;
+- (void)setDefinition:(FaceDef*)definition;
+
+- (void)update:(const StatisticsRecord*)record;
+
+@end
+
+@implementation Face
+
+- (id)initWithDefinition:(FaceDef*)def
+{
+    [super init];
+    faceDef = [def retain];
+    activity = 0;
+    health = 0;
+    image = [[NSImage alloc] initWithSize:NSMakeSize(128,128)];
+    return self;
+}
+
+- (void)dealloc
+{
+    [faceDef release];
+    [image release];
+    if (pageoutDate != nil) [pageoutDate release];
+    [super dealloc];
+}
+
+- (int)activity { return activity; }
+- (int)health { return health; }
+- (NSImage*)image { return image; }
+
+- (FaceDef*)definition
+{
+    return faceDef;
+}
+
+- (void)setDefinition:(FaceDef*)definition
+{
+    [faceDef autorelease];
+    faceDef = [definition retain];
+
+    [image lockFocus];
+    [[NSColor clearColor] set];
+    NSRectFill(NSMakeRect(0,0,128,128));
+    [faceDef drawImageOfRow:health col:activity marker:marker atPoint:NSMakePoint(0,0)];
+    [image unlockFocus];
+}
+
+- (void)update:(const StatisticsRecord*)record
+{
+    activity = (int)(100 - record->usage.idle) / 10;
+    pageout = pageout*0.97 + record->pageio.outcount;
+
+    if (record->pageio.outcount > 0) {
+        if (pageoutDate != nil) [pageoutDate release];
+        pageoutDate = [[NSDate alloc] init];
+    }
+
+    if (pageout > 40) {
+        health = 2;
+    } else if (pageoutDate && [pageoutDate timeIntervalSinceNow] > -15.0*60){
+        health = 1;
+    } else {
+        health = 0;
+    }
+
+    marker = 0;
+    if (record->pageio.outcount) {
+        marker |= FDMARKER_PAGEOUT;
+    }
+    if (record->pageio.incount) {
+        marker |= FDMARKER_PAGEIN;
+    }
+
+    [image lockFocus];
+    [[NSColor clearColor] set];
+    NSRectFill(NSMakeRect(0,0,128,128));
+    [faceDef drawImageOfRow:health col:activity marker:marker atPoint:NSMakePoint(0,0)];
+    [image unlockFocus];
+}
+
+@end
+
+*/
Index: /trunk/MacFaceLibrary/FaceDef.cs
===================================================================
--- /trunk/MacFaceLibrary/FaceDef.cs	(revision 11)
+++ /trunk/MacFaceLibrary/FaceDef.cs	(revision 12)
@@ -74,2 +74,417 @@
 	}
 }
+
+
+/*
+#import <Cocoa/Cocoa.h>
+
+//
+#define FACE_ROWMAX	3
+#define FACE_COLMAX	11
+#define FACE_PATMAX	8
+#define FACE_IMGW	128
+#define FACE_IMGH	128
+#define FACE_IMGSIZE	(NSMakeSize(128,128))
+
+// }[J[rbg}XN
+#define FDMARKER_PAGEIN		0x0001
+#define FDMARKER_PAGEOUT	0x0002
+
+//
+#define FACE_INFO_TITLE		@"title"
+#define FACE_INFO_AUTHOR	@"author"
+#define FACE_INFO_VERSION	@"version"
+#define FACE_INFO_SITE_URL	@"web site"
+
+#define FACE_INFO_PARTS		@"parts"
+#define FACE_INFO_PATTERN	@"pattern"
+#define FACE_INFO_MARKER	@"markers"
+#define FACE_INFO_TITLE_PATTERN	@"title pattern"
+#define FACE_INFO_MARK_PGOUT	@"pagein pattern"
+#define FACE_INFO_MARK_PGIN	@"pageout pattern"
+
+#define FACE_PART_IMAGE		@"filename"
+#define FACE_PART_POSX		@"pos x"
+#define FACE_PART_POSY		@"pos y"
+
+typedef struct {
+    NSString *filename;
+    NSImage *image;
+    NSPoint pos;
+} PartDef;
+
+typedef struct {
+    unsigned count;
+    int parts[FACE_PATMAX];
+} PatternDef;
+
+
+@interface FaceDef : NSObject
+{
+    NSString *packagePath;
+    NSDictionary *definition;
+    int partCount;
+    PartDef *parts;
+    PatternDef patterns[FACE_ROWMAX][FACE_COLMAX];
+    int markers[8];
+    PatternDef titlePattern;
+}
+
++ (NSDictionary*)infoAtPath:(NSString*)path;
+
++ (id)faceDefWithContentOfFile:(NSString*)path;
+
+- (id)initWithContentOfFile:(NSString*)path;
+
+- (NSString*)path;
+
+- (NSString*)title;
+- (NSString*)author;
+- (NSString*)version;
+- (NSString*)siteURL;
+
+- (NSImage*)titleImage;
+
+- (int)partCount;
+- (const PartDef*)partOfIndex:(int)index;
+- (const PatternDef*)patternOfRow:(int)row col:(int)col;
+- (int)patternCountOfRow:(int)row col:(int)col;
+- (int)patternNoOfRow:(int)row col:(int)col index:(int)index;
+
+- (NSImage*)imageOfRow:(int)row col:(int)col marker:(int)marker;
+
+- (void)drawImageOfRow:(int)row col:(int)col marker:(int)marker atPoint:(NSPoint)pt;
+- (void)drawPart:(PartDef*)part atPoint:(NSPoint)point;
+
+- (void)dumpPattern:(NSString*)path;
+
+@end
+
+@implementation FaceDef
+
++ (NSDictionary*)infoAtPath:(NSString*)path
+{
+    NSDictionary *info;
+
+    info = [NSDictionary dictionaryWithContentsOfFile:
+        [path stringByAppendingPathComponent:@"faceDef.plist"]];
+
+    return info;
+}
+
++ (id)faceDefWithContentOfFile:(NSString*)path
+{
+    return [[[self alloc] initWithContentOfFile:path] autorelease];
+}
+
+- (id)initWithContentOfFile:(NSString*)path
+{
+    NSDictionary *partDefDict;
+    NSArray *partArray,*patternArray,*colArray,*elemArray;
+    NSEnumerator *enumerator;
+    NSString *imagePath;
+    NSNumber *value;
+    int i,count;
+    int row,col,no;
+    int maxPartNo;
+
+    [super init];
+
+    NS_DURING
+        definition = [FaceDef infoAtPath:path];
+
+        if (definition == nil) {
+            [NSException raise:@"FaceDefInfoLoadException" format:@"failuer loading faceDef.plist"];
+        }
+
+        [definition retain];
+
+        packagePath = [path retain];
+
+        // p[cè`ÌÇÝÝ
+        partArray = [definition objectForKey:FACE_INFO_PARTS];
+
+        if ([partArray isMemberOfClass:[NSArray class]]) {
+            [NSException raise:@"FaceDefPartListLoadException" format:@"failed in reading part list."];
+        }
+
+        parts = calloc([partArray count],sizeof(PartDef));
+        count = [partArray count];
+
+        for (partCount = 0; partCount < count; partCount++){
+            partDefDict = [partArray objectAtIndex:partCount];
+            parts[partCount].filename = [[partDefDict objectForKey:FACE_PART_IMAGE] retain];
+            parts[partCount].pos.x = [(NSNumber*)[partDefDict objectForKey:FACE_PART_POSX] floatValue];
+            parts[partCount].pos.y = [(NSNumber*)[partDefDict objectForKey:FACE_PART_POSY] floatValue];
+            imagePath = [path stringByAppendingPathComponent:parts[partCount].filename];
+            parts[partCount].image = [[NSImage alloc]initWithContentsOfFile:imagePath];
+
+            if (parts[partCount].image == nil){ // æªÇÝßÈ©Á½
+                [NSException raise:@"FaceDefPartLoadException"
+                    format:@"failed in loading of image '%@'",parts[partCount].filename];
+            }
+        }
+
+        maxPartNo = count - 1;
+
+        // p^[è`ÌÇÝÝ
+        patternArray = [definition objectForKey:FACE_INFO_PATTERN];
+
+        for (row = 0; row < FACE_ROWMAX; row++){
+            colArray = [patternArray objectAtIndex:row];
+
+            if ([colArray count] != FACE_COLMAX) {
+                [NSException raise:@"FaceDefPatternLoadException"
+                    format:@"number of pattern columns is not 10 at row %d",row];
+            }
+
+            for (col = 0; col < FACE_COLMAX; col++){
+                elemArray = [colArray objectAtIndex:col];
+                enumerator = [[colArray objectAtIndex:col] objectEnumerator];
+                for (i = 0; i <= FACE_PATMAX && (value = [enumerator nextObject]) != nil; i++){
+                    no = [value intValue];
+                    patterns[row][col].parts[i] = no;
+                    if (0 > no || no > maxPartNo) { // p[cÔ`FbN
+                        [NSException raise:@"FaceDefPatternLoadException"
+                            format:@"illigal part no %d in patterns[%d,%d,%d]",no,row,col,i];
+                    }
+                }
+                patterns[row][col].count = i;
+            }
+        }
+
+        // }[J[XgÌÇÝÝ
+        enumerator = [[definition objectForKey:FACE_INFO_MARKER] objectEnumerator];
+        for (i = 0; i < 8 && (value = [enumerator nextObject]) != nil; i++){
+            markers[i] = [value intValue];
+        }
+
+        // ã\æp^[ÌÇÝÝ
+        enumerator = [[definition objectForKey:FACE_INFO_TITLE_PATTERN] objectEnumerator];
+        for (i = 0; i <= FACE_PATMAX && (value = [enumerator nextObject]) != nil; i++){
+            no = [value intValue];
+            titlePattern.parts[i] = no;
+            if (0 > no || no > maxPartNo) { // p[cÔ`FbN
+                [NSException raise:@"FaceDefPatternLoadException"
+                    format:@"illigal part no %d in title pattern",no];
+            }
+        }
+        titlePattern.count = i;
+    NS_HANDLER
+        NSLog(@"FaceDef load error: %@",localException);
+        [self dealloc];
+        self = nil;
+    NS_ENDHANDLER
+
+    return self;
+}
+
+- (void)dealloc
+{
+    int i;
+
+    [packagePath release];
+    [definition release];
+
+    if (parts != nil) {
+        for (i = 0; i < partCount; i++){
+            [parts[i].filename release];
+            [parts[i].image release];
+        }
+        free(parts);
+    }
+}
+
+-(NSString*)path
+{
+    return packagePath;
+}
+
+-(NSString*)title
+{
+    NSString *str;
+    str = [definition objectForKey:@"title"];
+    return  (str != nil) ? str : @"";
+}
+
+-(NSString*)author
+{
+    NSString *str;
+    str = [definition objectForKey:@"author"];
+    return  (str != nil) ? str : @"";
+}
+
+-(NSString*)version
+{
+    NSString *str;
+    str = [definition objectForKey:@"version"];
+    return  (str != nil) ? str : @"";
+}
+
+- (NSString*)siteURL
+{
+    NSString *str;
+    str = [definition objectForKey:@"web site"];
+    return  (str != nil) ? str : @"";
+}
+
+- (NSImage*)titleImage
+{
+    NSImage *image;
+    int i;
+
+    image = [[NSImage alloc] initWithSize:FACE_IMGSIZE];
+    [image lockFocus];
+
+    if (titlePattern.count > 0) {
+        for (i=0; i<titlePattern.count; i++) {
+            [self drawPart:&parts[titlePattern.parts[i]] atPoint:NSMakePoint(0,0)];
+        }
+    } else {
+        [self drawImageOfRow:0 col:FACE_COLMAX marker:0 atPoint:NSMakePoint(0,0)];
+    }
+
+    [image unlockFocus];
+    return [image autorelease];
+}
+
+- (int)partCount
+{
+    return partCount;
+}
+
+- (const PartDef*)partOfIndex:(int)index
+{
+    if (0 <= index && index < partCount) return &parts[index];
+    else return nil;
+}
+
+- (const PatternDef*)patternOfRow:(int)row col:(int)col
+{
+    if (0 <= row && row < FACE_ROWMAX
+     && 0 <= col && col < FACE_COLMAX) return &patterns[row][col];
+    else return nil;
+}
+
+- (int)patternCountOfRow:(int)row col:(int)col
+{
+    if (0 <= row && row < FACE_ROWMAX
+     && 0 <= col && col < FACE_COLMAX) return patterns[row][col].count;
+    else return -1;
+}
+
+- (int)patternNoOfRow:(int)row col:(int)col index:(int)index
+{
+    if (0 <= row && row < FACE_ROWMAX
+     && 0 <= col && col < FACE_COLMAX
+     && 0 <= index && index < patterns[row][col].count) return patterns[row][col].parts[index];
+    else return -1;
+}
+
+- (NSImage*)imageOfRow:(int)row col:(int)col marker:(int)marker
+{
+    NSImage *image;
+    image = [[NSImage alloc] initWithSize:FACE_IMGSIZE];
+    [image lockFocus];
+    [self drawImageOfRow:row col:col marker:marker atPoint:NSMakePoint(0,0)];
+    [image unlockFocus];
+    return [image autorelease];
+}
+
+- (void)drawImageOfRow:(int)row col:(int)col marker:(int)marker atPoint:(NSPoint)point
+{
+    int count;
+    int i;
+
+    count = patterns[row][col].count;
+    for (i=0; i<count; i++){
+        [self drawPart:&parts[patterns[row][col].parts[i]] atPoint:point];
+    };
+
+    if (marker != 0) {
+        for (i=0; i<8; i++) {
+            if (marker & (1<<i)) {
+                [self drawPart:&parts[markers[i]] atPoint:point];
+            }
+        }
+    }
+}
+
+- (void)drawPart:(PartDef*)part atPoint:(NSPoint)point
+{
+    point.x += part->pos.x;
+    point.y += part->pos.y;
+    [part->image compositeToPoint:point operation:NSCompositeSourceOver];
+}
+
+-(void)dumpPattern:(NSString*)path;
+{
+    NSImage *img;
+    NSSize imgSize;
+    NSPoint pos;
+    float offset;
+    int i,j,rows;
+    NSMutableDictionary	*attr;
+    NSString *str;
+
+    rows = partCount / FACE_COLMAX + 1;
+    offset = rows * FACE_IMGW + 10;
+    imgSize.width = FACE_IMGW * FACE_COLMAX;
+    imgSize.height = FACE_IMGH * FACE_ROWMAX + offset + 14;
+
+    img = [[NSImage alloc] initWithSize:imgSize];
+    if (img == nil) {
+        NSLog(@"failure dump pattern!");
+        return;
+    }
+
+    [img lockFocus];
+    [[NSColor whiteColor] set];
+    NSRectFill(NSMakeRect(0,0,imgSize.width,imgSize.height));
+
+    [[NSColor blackColor] set];
+    NSRectFill(NSMakeRect(0,offset-6,imgSize.width,2));
+
+    attr = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
+                [NSFont systemFontOfSize:14.0], NSFontAttributeName,
+                [NSColor blackColor], NSForegroundColorAttributeName,
+                nil];
+
+    for (i = 0; i <= partCount; i++) {
+        pos.x = (i % FACE_COLMAX) * FACE_IMGW;
+        pos.y = (rows-1 - i / FACE_COLMAX) * FACE_IMGH;
+        [self drawPart:&parts[i] atPoint:pos];
+
+        str = [NSString stringWithFormat:@"%d",i];
+        pos.x = (i % FACE_COLMAX) * FACE_IMGW;
+        pos.y = (rows-1 - i / FACE_COLMAX) * FACE_IMGH + FACE_IMGH - 12;
+        [str drawAtPoint:pos withAttributes:attr];
+    }
+
+    for (i = 0; i < FACE_ROWMAX; i++) {
+        pos.y = (FACE_ROWMAX-1 - i) * FACE_IMGH + offset;
+        for (j=0; j<FACE_COLMAX; j++) {
+            pos.x = j * FACE_IMGW;
+            [self drawImageOfRow:i col:j marker:0 atPoint:pos];
+        }
+    }
+
+    pos.y = imgSize.height - 14;
+    for (i = 0; i < FACE_COLMAX-1; i++) {
+        str = [NSString stringWithFormat:@"%d-%d%%",i*10,(i+1)*10-1];
+        pos.x = i * FACE_IMGW;
+        [str drawAtPoint:pos withAttributes:attr];
+    }
+    str = [NSString stringWithFormat:@"%d%%",100];
+    pos.x = (FACE_COLMAX-1) * FACE_IMGW;
+    [str drawAtPoint:pos withAttributes:attr];
+
+    [img unlockFocus];
+
+    [[img TIFFRepresentation] writeToFile:path atomically:NO];
+    [img release];
+}
+
+@end
+
+*/
Index: /trunk/MacFaceLibrary/HostStatistics.cs
===================================================================
--- /trunk/MacFaceLibrary/HostStatistics.cs	(revision 12)
+++ /trunk/MacFaceLibrary/HostStatistics.cs	(revision 12)
@@ -0,0 +1,252 @@
+using System;
+
+namespace MacFace
+{
+	/// <summary>
+	/// HostStatistics ÌTvÌà¾Å·B
+	/// </summary>
+	public class HostStatistics
+	{
+		public HostStatistics()
+		{
+			// 
+			// TODO: RXgN^ WbNð±±ÉÇÁµÄ­¾³¢B
+			//
+		}
+	}
+}
+
+/*
+
+typedef struct {
+    int freePages;
+    int activePages;
+    int inactivePages;
+    int wirePages;
+    int faults;
+    int pageins;
+    int pageouts;
+    unsigned long userTicks;
+    unsigned long systemTicks;
+    unsigned long idleTicks;
+    unsigned long niceTicks;
+} HostStatData;
+
+typedef struct {
+    int incount;
+    int outcount;
+} Pageio;
+
+typedef struct {
+    float user;
+    float system;
+    float idle;
+    float nice;
+} CPUUsage;
+
+typedef struct {
+    HostStatData stat;
+    Pageio pageio;
+    CPUUsage usage;
+} StatisticsRecord;
+
+@interface HostStatistics : NSObject
+{
+    StatisticsRecord *ringBuffer;
+    int bufMaxLen;
+    int bufHead;
+    int bufTail;
+    int bufLen;
+    int totalPages;
+    int minUsedPages;
+    int maxUsedPages;
+}
+
++ (unsigned int)vmPageSize;
++ (NSString*)kernelVersion;
++ (void)getStatistics:(HostStatData*)data;
+
+- (id)initWithCapacity:(unsigned)capacity;
+- (void)update;
+- (int)totalPages;
+- (int)minUsedPages;
+- (int)maxUsedPages;
+- (int)length;
+- (const StatisticsRecord*)indexAt:(unsigned)index;
+- (const StatisticsRecord*)head;
+- (const StatisticsRecord*)tail;
+@end
+
+#import <mach/mach.h>
+#import <mach/mach_types.h>
+#import "HostStatistics.h"
+
+//
+//
+static void hostStatistics(HostStatData *data)
+{
+    vm_statistics_data_t vm_stat;
+    mach_msg_type_number_t vm_count = HOST_VM_INFO_COUNT;
+    host_cpu_load_info_data_t load_info;
+    mach_msg_type_number_t load_info_count = HOST_CPU_LOAD_INFO_COUNT;
+    host_t host = mach_host_self();
+
+    host_statistics(host,HOST_VM_INFO,(host_info_t)&vm_stat, &vm_count);
+    host_statistics(host,HOST_CPU_LOAD_INFO,(host_info_t)&load_info, &load_info_count);
+
+    data->freePages = vm_stat.free_count;
+    data->activePages = vm_stat.active_count;
+    data->inactivePages = vm_stat.inactive_count;
+    data->wirePages = vm_stat.wire_count;
+    data->faults = vm_stat.faults;
+    data->pageins = vm_stat.pageins;
+    data->pageouts = vm_stat.pageouts;
+
+    data->userTicks = load_info.cpu_ticks[CPU_STATE_USER];
+    data->systemTicks = load_info.cpu_ticks[CPU_STATE_SYSTEM];
+    data->idleTicks = load_info.cpu_ticks[CPU_STATE_IDLE];
+    data->niceTicks = load_info.cpu_ticks[CPU_STATE_NICE];
+}
+
+@implementation HostStatistics
+
+//
+// ¼zL¯Ìy[WTCYðÔ·
+//
++ (unsigned int)vmPageSize
+{
+    vm_size_t page_size;
+    host_page_size(mach_host_self(),&page_size);
+    return page_size;
+}
+
+//
+// J[lÌo[W¶ñðÔ·
+//
++ (NSString*)kernelVersion
+{
+    kernel_version_t kver;
+    host_kernel_version(mach_host_self(),kver);
+    return [NSString stringWithUTF8String:kver];
+}
+
+//
+// »ÝÌvîñðÝè·é
+//
++ (void)getStatistics:(HostStatData*)data
+{
+    hostStatistics(data);
+}
+
+//
+// ú»
+//   capacity: Oobt@ÌeÊ
+//
+- (id)initWithCapacity:(unsigned)capacity
+{
+    StatisticsRecord *rec;
+
+    ringBuffer = calloc(sizeof(StatisticsRecord),capacity);
+    rec = &ringBuffer[0];
+    hostStatistics(&rec->stat);
+    rec->usage.user = 0;
+    rec->usage.system = 0;
+    rec->usage.idle = 100.0;
+    rec->usage.nice = 0;
+
+    bufMaxLen = capacity;
+    bufHead = 0;
+    bufTail = 0;
+    bufLen = 1;
+
+    totalPages = rec->stat.wirePages + rec->stat.activePages + rec->stat.inactivePages + rec->stat.freePages;
+    minUsedPages = rec->stat.wirePages + rec->stat.activePages;
+    maxUsedPages = minUsedPages;
+
+    return self;
+}
+
+//
+// ãn
+//
+- (void)dealloc
+{
+    free(ringBuffer);
+    [super dealloc];
+}
+
+//
+// ðÌXV
+//
+- (void)update
+{
+    StatisticsRecord *rec, *lastRec;
+    int user,sys,idle,nice,total;
+    int usedPages;
+
+    lastRec = &ringBuffer[bufHead];
+    if (bufLen < bufMaxLen) bufLen++;
+    if (++bufHead >= bufLen) bufHead = 0;
+    if (bufHead == bufTail)
+        if (++bufTail >= bufLen) bufTail = 0;
+    rec = &ringBuffer[bufHead];
+    hostStatistics(&rec->stat);
+
+    rec->pageio.incount = rec->stat.pageins - lastRec->stat.pageins;
+    rec->pageio.outcount = rec->stat.pageouts - lastRec->stat.pageouts;
+
+    user = rec->stat.userTicks - lastRec->stat.userTicks;
+    sys = rec->stat.systemTicks - lastRec->stat.systemTicks;
+    idle = rec->stat.idleTicks - lastRec->stat.idleTicks;
+    nice = rec->stat.niceTicks - lastRec->stat.niceTicks;
+    total = user + sys + idle + nice;
+
+    if (total > 0) {
+        rec->usage.user = user * 100.0 / total;
+        rec->usage.system = sys * 100.0 / total;
+        rec->usage.idle = idle * 100.0 / total;
+        rec->usage.nice = nice * 100.0 / total;
+    } else {
+        rec->usage = lastRec->usage;
+    }
+
+    usedPages = rec->stat.wirePages + rec->stat.activePages;
+    if( minUsedPages < usedPages) minUsedPages = usedPages;
+    if( maxUsedPages > usedPages) maxUsedPages = usedPages;
+}
+
+- (int)totalPages { return totalPages; }
+- (int)minUsedPages { return minUsedPages; }
+- (int)maxUsedPages { return maxUsedPages; }
+- (int)length { return bufLen; }
+
+//
+// wèµ½ÊuÌvîñð¾é
+//   index: Êu(ÅVª0)
+//
+- (const StatisticsRecord*)indexAt:(unsigned)index;
+{
+    if (index >= bufLen) return nil;
+    index = (index <= bufHead) ? bufHead - index : bufLen + bufHead - index;
+    return &ringBuffer[index];
+}
+
+//
+// àÁÆàVµ¢vîñðÔ·
+//
+- (const StatisticsRecord*)head
+{
+    return &ringBuffer[bufHead];
+}
+
+//
+// àÁÆàÃ¢vîñðÔ·
+//
+- (const StatisticsRecord*)tail;
+{
+    return &ringBuffer[bufTail];
+}
+
+@end
+
+*/
Index: /trunk/MacFaceLibrary/MacFaceLibrary.csproj
===================================================================
--- /trunk/MacFaceLibrary/MacFaceLibrary.csproj	(revision 11)
+++ /trunk/MacFaceLibrary/MacFaceLibrary.csproj	(revision 12)
@@ -77,5 +77,5 @@
                 <Reference
                     Name = "System.XML"
-                    AssemblyName = "System.XML"
+                    AssemblyName = "System.Xml"
                     HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
                 />
@@ -95,5 +95,15 @@
                 />
                 <File
+                    RelPath = "Face.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
                     RelPath = "FaceDef.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "HostStatistics.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
