mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-22 12:55:44 +00:00
* EOControl/EOEvent.[hm]: New files.
* EOControl/EOEventCenter.[hm]: New files. * EOControl/EOControl.h: Add EOEvent.h and EOEventCenter.h. * EOControl/GNUmakefile: Add EOEvent.h/m and EOEventCenter.h/m. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@22178 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4845e0047c
commit
59216ebe78
7 changed files with 490 additions and 0 deletions
|
@ -9,6 +9,11 @@
|
|||
|
||||
* EOAccess/EOAttribute.m: Translate comment to avoid
|
||||
non-ASCII encoding.
|
||||
|
||||
* EOControl/EOEvent.[hm]: New files.
|
||||
* EOControl/EOEventCenter.[hm]: New files.
|
||||
* EOControl/EOControl.h: Add EOEvent.h and EOEventCenter.h.
|
||||
* EOControl/GNUmakefile: Add EOEvent.h/m and EOEventCenter.h/m.
|
||||
|
||||
2005-12-05 David Ayers <d.ayers@inode.at>
|
||||
|
||||
|
|
|
@ -48,6 +48,8 @@
|
|||
#include <EOControl/EODetailDataSource.h>
|
||||
#include <EOControl/EOObserver.h>
|
||||
#include <EOControl/EOMultiReaderLock.h>
|
||||
#include <EOControl/EOEvent.h>
|
||||
#include <EOControl/EOEventCenter.h>
|
||||
#include <EOControl/EODebug.h>
|
||||
|
||||
|
||||
|
|
87
EOControl/EOEvent.h
Normal file
87
EOControl/EOEvent.h
Normal file
|
@ -0,0 +1,87 @@
|
|||
/* -*-objc-*-
|
||||
EOEvent.h
|
||||
|
||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
|
||||
Author: David Ayers <d.ayers@inode.at>
|
||||
Date: December 2005
|
||||
|
||||
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_EOEvent_h__
|
||||
#define __EOControl_EOEvent_h__
|
||||
|
||||
#ifdef GNUSTEP
|
||||
#include <Foundation/NSObject.h>
|
||||
#else
|
||||
#include <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#include <EOControl/EODefines.h>
|
||||
|
||||
GDL2CONTROL_EXPORT
|
||||
NSString *EOEventGroupName;
|
||||
|
||||
typedef enum {
|
||||
EOBasicEventSignature
|
||||
} EOEventSignatureType;
|
||||
|
||||
@class NSString;
|
||||
@class NSArray;
|
||||
@class NSDictionary;
|
||||
@class NSCalendarDate;
|
||||
|
||||
/*
|
||||
* WARNING!!! This class is currently completely unimplemented.
|
||||
*/
|
||||
@interface EOEvent : NSObject
|
||||
{
|
||||
id _info;
|
||||
NSString *_type;
|
||||
double _encountered;
|
||||
double _duration;
|
||||
EOEvent *_parent;
|
||||
EOEvent *_child;
|
||||
EOEvent *_next;
|
||||
}
|
||||
+ (NSDictionary *)eventTypeDescriptions;
|
||||
- (NSString *)title;
|
||||
|
||||
- (void)markStartWithInfo: (id)info;
|
||||
- (void)markAtomicWithInfo: (id)info;
|
||||
- (void)markEnd;
|
||||
- (void)setInfo: (id)info;
|
||||
- (id)info;
|
||||
- (void)setType: (NSString *)type;
|
||||
- (NSString *)type;
|
||||
- (NSArray *)subevents;
|
||||
- (EOEvent *)parentEvent;
|
||||
- (id)signatureOfType: (EOEventSignatureType)tag;
|
||||
- (NSString *)comment;
|
||||
- (NSCalendarDate *)startDate;
|
||||
- (NSString *)displayComponentName;
|
||||
- (int)duration;
|
||||
- (int)durationWithoutSubevents;
|
||||
+ (NSArray *)groupEvents: (NSArray *)events
|
||||
bySignatureOfType: (EOEventSignatureType)tag;
|
||||
+ (NSArray *)aggregateEvents: (NSArray *)events
|
||||
bySignatureOfType: (EOEventSignatureType)tag;
|
||||
@end
|
||||
|
||||
#endif
|
124
EOControl/EOEvent.m
Normal file
124
EOControl/EOEvent.m
Normal file
|
@ -0,0 +1,124 @@
|
|||
/* -*-objc-*-
|
||||
EOEvent.m
|
||||
|
||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
|
||||
Author: David Ayers <d.ayers@inode.at>
|
||||
Date: December 2005
|
||||
|
||||
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 "config.h"
|
||||
|
||||
RCS_ID("$Id$")
|
||||
|
||||
#include "EOEvent.h"
|
||||
|
||||
#ifndef GNUSTEP
|
||||
#include <GNUstepBase/GNUstep.h>
|
||||
#include <GNUstepBase/GSCategories.h>
|
||||
#include <Foundation/Foundation.h>
|
||||
#else
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
#include <Foundation/NSCalendarDate.h>
|
||||
#endif
|
||||
|
||||
NSString *EOEventGroupName = @"EOEventGroupName";
|
||||
|
||||
/**
|
||||
* WARNING!!! This class is currently completely unimplemented.
|
||||
*/
|
||||
@implementation EOEvent
|
||||
+ (NSDictionary *)eventTypeDescriptions
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
- (NSString *)title
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)markStartWithInfo: (id)info
|
||||
{
|
||||
}
|
||||
- (void)markAtomicWithInfo: (id)info
|
||||
{
|
||||
}
|
||||
- (void)markEnd
|
||||
{
|
||||
}
|
||||
- (void)setInfo: (id)info
|
||||
{
|
||||
}
|
||||
- (id)info
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
- (void)setType: (NSString *)type
|
||||
{
|
||||
}
|
||||
- (NSString *)type
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
- (NSArray *)subevents
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
- (EOEvent *)parentEvent
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
- (id)signatureOfType: (EOEventSignatureType)tag
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
- (NSString *)comment
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
- (NSCalendarDate *)startDate
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
- (NSString *)displayComponentName
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
- (int)duration
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
- (int)durationWithoutSubevents
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
+ (NSArray *)groupEvents: (NSArray *)events
|
||||
bySignatureOfType: (EOEventSignatureType)tag
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
+ (NSArray *)aggregateEvents: (NSArray *)events
|
||||
bySignatureOfType: (EOEventSignatureType)tag
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
@end
|
113
EOControl/EOEventCenter.h
Normal file
113
EOControl/EOEventCenter.h
Normal file
|
@ -0,0 +1,113 @@
|
|||
/* -*-objc-*-
|
||||
EOEventCenter.h
|
||||
|
||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
|
||||
Author: David Ayers <d.ayers@inode.at>
|
||||
Date: December 2005
|
||||
|
||||
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_EOEventCenter_h__
|
||||
#define __EOControl_EOEventCenter_h__
|
||||
|
||||
#ifdef GNUSTEP
|
||||
#include <Foundation/NSObject.h>
|
||||
#include <Foundation/NSHashTable.h>
|
||||
#else
|
||||
#include <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#include <EOControl/EODefines.h>
|
||||
|
||||
@class NSString;
|
||||
@class EOEvent;
|
||||
|
||||
/*
|
||||
* WARNING!!! These functions are currently completely unimplemented.
|
||||
*/
|
||||
GDL2CONTROL_EXPORT
|
||||
id EONewEventOfClass(Class eventClass, NSString *type);
|
||||
GDL2CONTROL_EXPORT
|
||||
void EOMarkAtomicEvent(EOEvent *event, id info);
|
||||
GDL2CONTROL_EXPORT
|
||||
void EOMarkStartOfEvent(EOEvent *event, id info);
|
||||
GDL2CONTROL_EXPORT
|
||||
void EOMarkEndOfEvent(EOEvent *event);
|
||||
GDL2CONTROL_EXPORT
|
||||
void EOCancelEvent(EOEvent *event);
|
||||
|
||||
GDL2CONTROL_EXPORT NSString *EOEventLoggingOverflowDisplay;
|
||||
GDL2CONTROL_EXPORT NSString *EOEventLoggingEnabled;
|
||||
GDL2CONTROL_EXPORT NSString *EOEventLoggingLimit;
|
||||
|
||||
@protocol EOEventRecordingHandler
|
||||
- (void)setLoggingEnabled: (BOOL)flag
|
||||
forEventClass: (Class)eventClass;
|
||||
@end
|
||||
|
||||
@interface NSObject (EOEventRecordingHandler) <EOEventRecordingHandler>
|
||||
- (void)setLoggingEnabled: (BOOL)flag
|
||||
forEventClass: (Class)eventClass;
|
||||
@end
|
||||
|
||||
/*
|
||||
* WARNING!!! This class is currently completely unimplemented.
|
||||
*/
|
||||
@interface EOEventCenter : NSObject
|
||||
{
|
||||
EOEvent *_rootEvent;
|
||||
EOEvent *_lastEvent;
|
||||
NSHashTable *_events;
|
||||
int _eventCounter;
|
||||
}
|
||||
+ (EOEventCenter *)currentCenter;
|
||||
+ (NSArray *)allCenters;
|
||||
+ (void)suspendLogging;
|
||||
+ (void)resumeLogging;
|
||||
+ (void)resetLogging;
|
||||
- (void)resetLogging;
|
||||
+ (void)registerEventClass: (Class)eventClass
|
||||
classPointer: (Class *)classPtr;
|
||||
+ (void)registerEventClass: (Class)eventClass
|
||||
handler: (id <EOEventRecordingHandler>)handler;
|
||||
+ (NSArray *)registeredEventClasses;
|
||||
+ (BOOL)recordsEventsForClass: (Class)eventClass;
|
||||
+ (void)setRecordsEvents: (BOOL)flag
|
||||
forClass: (Class)eventClass;
|
||||
+ (id)newEventOfClass: (Class)eventClass
|
||||
type: (NSString *)type;
|
||||
+ (void)markStartOfEvent: (EOEvent *)event
|
||||
info: (id)info;
|
||||
+ (void)markAtomicEvent: (EOEvent *)event
|
||||
info: (id)info;
|
||||
+ (void)markEndOfEvent:(EOEvent *)event;
|
||||
+ (void)cancelEvent:(EOEvent *)event;
|
||||
- (NSArray *)eventsOfClass: (Class)eventClass
|
||||
type: (NSString *)type;
|
||||
+ (NSArray *)eventsOfClass: (Class)eventClass
|
||||
type:(NSString *)type;
|
||||
+ (NSArray *)rootEvents;
|
||||
- (NSArray *)rootEvents;
|
||||
+ (NSArray *)rootEventsByDuration;
|
||||
- (NSArray *)allEvents;
|
||||
+ (NSArray *)allEvents;
|
||||
@end
|
||||
|
||||
#endif
|
155
EOControl/EOEventCenter.m
Normal file
155
EOControl/EOEventCenter.m
Normal file
|
@ -0,0 +1,155 @@
|
|||
/* -*-objc-*-
|
||||
EOEventCenter.m
|
||||
|
||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
|
||||
Author: David Ayers <d.ayers@inode.at>
|
||||
Date: December 2005
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifdef GNUSTEP
|
||||
#include <Foundation/NSString.h>
|
||||
#else
|
||||
#include <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#include "EOEventCenter.h"
|
||||
#include "EOEvent.h"
|
||||
|
||||
id
|
||||
EONewEventOfClass(Class eventClass, NSString *type)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
void
|
||||
EOMarkAtomicEvent(EOEvent *event, id info)
|
||||
{
|
||||
}
|
||||
void
|
||||
EOMarkStartOfEvent(EOEvent *event, id info)
|
||||
{
|
||||
}
|
||||
void
|
||||
EOMarkEndOfEvent(EOEvent *event)
|
||||
{
|
||||
}
|
||||
void
|
||||
EOCancelEvent(EOEvent *event)
|
||||
{
|
||||
}
|
||||
|
||||
NSString *EOEventLoggingOverflowDisplay = @"EOEventLoggingOverflowDisplay";
|
||||
NSString *EOEventLoggingEnabled = @"EOEventLoggingEnabled";
|
||||
NSString *EOEventLoggingLimit = @"EOEventLoggingLimit";
|
||||
|
||||
/**
|
||||
* WARNING!!! This class is currently completely unimplemented.
|
||||
*/
|
||||
@implementation EOEventCenter
|
||||
+ (EOEventCenter *)currentCenter
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
+ (NSArray *)allCenters
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
+ (void)suspendLogging
|
||||
{
|
||||
}
|
||||
+ (void)resumeLogging
|
||||
{
|
||||
}
|
||||
+ (void)resetLogging
|
||||
{
|
||||
}
|
||||
- (void)resetLogging
|
||||
{
|
||||
}
|
||||
+ (void)registerEventClass: (Class)eventClass
|
||||
classPointer: (Class *)classPtr
|
||||
{
|
||||
}
|
||||
+ (void)registerEventClass: (Class)eventClass
|
||||
handler: (id <EOEventRecordingHandler>)handler
|
||||
{
|
||||
}
|
||||
+ (NSArray *)registeredEventClasses
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
+ (BOOL)recordsEventsForClass: (Class)eventClass
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
+ (void)setRecordsEvents: (BOOL)flag
|
||||
forClass: (Class)eventClass
|
||||
{
|
||||
}
|
||||
+ (id)newEventOfClass: (Class)eventClass
|
||||
type: (NSString *)type
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
+ (void)markStartOfEvent: (EOEvent *)event
|
||||
info: (id)info
|
||||
{
|
||||
}
|
||||
+ (void)markAtomicEvent: (EOEvent *)event
|
||||
info: (id)info
|
||||
{
|
||||
}
|
||||
+ (void)markEndOfEvent:(EOEvent *)event
|
||||
{
|
||||
}
|
||||
+ (void)cancelEvent:(EOEvent *)event
|
||||
{
|
||||
}
|
||||
- (NSArray *)eventsOfClass: (Class)eventClass
|
||||
type: (NSString *)type
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
+ (NSArray *)eventsOfClass: (Class)eventClass
|
||||
type:(NSString *)type
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
+ (NSArray *)rootEvents
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
- (NSArray *)rootEvents
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
+ (NSArray *)rootEventsByDuration
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
- (NSArray *)allEvents
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
+ (NSArray *)allEvents
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
@end
|
|
@ -68,6 +68,8 @@ EONSAddOns.m \
|
|||
EOCheapArray.m \
|
||||
EOArrayDataSource.m \
|
||||
EOMultiReaderLock.m \
|
||||
EOEvent.m \
|
||||
EOEventCenter.m \
|
||||
EODebug.m \
|
||||
EOPrivate.m
|
||||
|
||||
|
@ -95,6 +97,8 @@ EODataSource.h \
|
|||
EODetailDataSource.h \
|
||||
EOArrayDataSource.h \
|
||||
EOMultiReaderLock.h \
|
||||
EOEvent.h \
|
||||
EOEventCenter.h \
|
||||
EODebug.h \
|
||||
EONSAddOns.h \
|
||||
EODefines.h \
|
||||
|
|
Loading…
Reference in a new issue