Tools__ToDoListEntry.st
changeset 7444 8fda127bf597
child 7530 030aee01ca59
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Tools__ToDoListEntry.st	Mon Oct 23 10:57:48 2006 +0200
@@ -0,0 +1,117 @@
+"{ Package: 'stx:libtool' }"
+
+"{ NameSpace: Tools }"
+
+Object subclass:#ToDoListEntry
+	instanceVariableNames:'list stillValid severity priority timestamp message'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Interface-Smalltalk-ToDo'
+!
+
+
+!ToDoListEntry methodsFor:'accessing'!
+
+list:something
+    list := something.
+!
+
+message
+    ^ message
+!
+
+priority
+    ^ priority ? 0
+
+    "Modified: / 22-10-2006 / 11:09:36 / cg"
+!
+
+severity
+    ^ severity ? 0
+
+    "Modified: / 22-10-2006 / 11:09:42 / cg"
+!
+
+severity:severityArg priority:priorityArg timestamp:timestampArg message:messageArg 
+    severity := severityArg.
+    priority := priorityArg.
+    timestamp := timestampArg.
+    message := messageArg.
+!
+
+stillValid
+    ^ stillValid ? true
+
+    "Created: / 21-10-2006 / 20:45:33 / cg"
+!
+
+time
+    ^ timestamp asTime
+
+    "Created: / 21-10-2006 / 20:58:14 / cg"
+!
+
+timestamp
+    ^ timestamp
+! !
+
+!ToDoListEntry methodsFor:'duplicate detection'!
+
+isAlreadyPresentIn:aList
+    ^ aList contains:[:anEntry | anEntry sameAs:self ].
+
+    "Created: / 21-10-2006 / 21:36:57 / cg"
+!
+
+sameAs:anotherEntry
+    self subclassResponsibility
+
+    "Created: / 21-10-2006 / 21:37:42 / cg"
+!
+
+sameAsCompilerWarningToDoListEntry:anotherEntry
+    ^ false
+
+    "Created: / 21-10-2006 / 21:40:47 / cg"
+! !
+
+!ToDoListEntry methodsFor:'misc'!
+
+browse
+    self subclassResponsibility
+
+    "Created: / 22-10-2006 / 01:37:42 / cg"
+! !
+
+!ToDoListEntry methodsFor:'printing & storing'!
+
+printOn:aStream
+    aStream nextPutAll:message
+
+    "Created: / 21-10-2006 / 23:13:39 / cg"
+! !
+
+!ToDoListEntry methodsFor:'validation'!
+
+checkIfStillValid
+    self subclassResponsibility
+
+    "Created: / 21-10-2006 / 21:30:29 / cg"
+!
+
+revalidate
+    self checkIfStillValid ifFalse:[
+        stillValid := false.
+        list removeIdentical:self ifAbsent:[].
+        Smalltalk removeDependent:self.
+    ].
+
+    "Created: / 21-10-2006 / 20:46:03 / cg"
+    "Modified: / 21-10-2006 / 22:00:52 / cg"
+! !
+
+!ToDoListEntry class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__ToDoListEntry.st,v 1.1 2006-10-23 08:57:48 cg Exp $'
+! !