From 7a86463f815d652bce19e8d6876c0c5830732750 Mon Sep 17 00:00:00 2001 From: ayers Date: Wed, 11 Jul 2007 18:11:36 +0000 Subject: [PATCH] * EOControl/EOAggregateEvent.h/m: New files with stub implementations. * EOControl/GNUmakefile: Add EOAggregateEvent.h/m. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@25317 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++ EOControl/EOAggregateEvent.h | 46 ++++++++++++++++++++++++++++++ EOControl/EOAggregateEvent.m | 54 ++++++++++++++++++++++++++++++++++++ EOControl/GNUmakefile | 2 ++ 4 files changed, 108 insertions(+) create mode 100644 EOControl/EOAggregateEvent.h create mode 100644 EOControl/EOAggregateEvent.m diff --git a/ChangeLog b/ChangeLog index 0bbd810..1502f5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-07-11 David Ayers + + * EOControl/EOAggregateEvent.h/m: New files with stub + implementations. + * EOControl/GNUmakefile: Add EOAggregateEvent.h/m. + 2007-05-05 Matt Rice * EOInterface/EODisplayGroup.m (-deleteObjectAtIndex:): diff --git a/EOControl/EOAggregateEvent.h b/EOControl/EOAggregateEvent.h new file mode 100644 index 0000000..31469ad --- /dev/null +++ b/EOControl/EOAggregateEvent.h @@ -0,0 +1,46 @@ +/* -*-objc-*- + EOAggregateEvent.h + + Copyright (C) 2007 Free Software Foundation, Inc. + + Date: July 2007 + + This file is part of the GNUstep Database Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#ifndef __EOControl_EOAggregateEvent_h__ +#define __EOControl_EOAggregateEvent_h__ + +#include + +@class NSArray; +@class NSMutableSet; + +@interface EOAggregateEvent : EOEvent +{ + NSMutableSet *_references; + NSArray *_children; + int _aggregateSignatureTag; +} + +- (void)addEvent:(EOEvent *)event; +- (NSArray *)events; + +@end + +#endif diff --git a/EOControl/EOAggregateEvent.m b/EOControl/EOAggregateEvent.m new file mode 100644 index 0000000..1f1ce49 --- /dev/null +++ b/EOControl/EOAggregateEvent.m @@ -0,0 +1,54 @@ +/* -*-objc-*- + EOEditingContext.m + + Copyright (C) 2007 Free Software Foundation, Inc. + + Date: July 2007 + + This file is part of the GNUstep Database Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +#include + +#include "EOAggregateEvent.h" + +@implementation EOAggregateEvent + +- (id)init +{ + if ((self = [super init])) + { + NSZone *zone = [self zone]; + _children = [[NSArray allocWithZone: zone] init]; + _references = [[NSMutableSet allocWithZone: zone] init]; + _aggregateSignatureTag = 0; + } + return self; +} + +- (void)addEvent:(EOEvent *)event +{ + _children = RETAIN([_children arrayByAddingObject: event]); +} + +- (NSArray *)events +{ + return _children; +} + +@end diff --git a/EOControl/GNUmakefile b/EOControl/GNUmakefile index 1dbcb7c..a4f7c68 100644 --- a/EOControl/GNUmakefile +++ b/EOControl/GNUmakefile @@ -67,6 +67,7 @@ EONSAddOns.m \ EOCheapArray.m \ EOArrayDataSource.m \ EOMultiReaderLock.m \ +EOAggregateEvent.m \ EOEvent.m \ EOEventCenter.m \ EODebug.m \ @@ -96,6 +97,7 @@ EODataSource.h \ EODetailDataSource.h \ EOArrayDataSource.h \ EOMultiReaderLock.h \ +EOAggregateEvent.h \ EOEvent.h \ EOEventCenter.h \ EODebug.h \