git/GitSignature.st
changeset 8 4275f357d3e8
child 10 3d98ee6c5c64
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/git/GitSignature.st	Wed Sep 19 01:08:21 2012 +0000
@@ -0,0 +1,62 @@
+"{ Package: 'stx:libscm/git' }"
+
+GitModel subclass:#GitSignature
+	instanceVariableNames:'name email timestamp'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'SCM-Git-Model'
+!
+
+
+!GitSignature methodsFor:'accessing'!
+
+email
+
+    (email isNil and:[handle notNil]) ifTrue:[
+        email := handle email copyCStringFromHeap utf8Decoded
+    ].
+    ^email
+
+    "Modified: / 19-09-2012 / 01:56:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+name
+
+    (name isNil and:[handle notNil]) ifTrue:[
+        name := handle name copyCStringFromHeap utf8Decoded
+    ].
+    ^name
+
+    "Modified: / 19-09-2012 / 01:56:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+timestamp
+
+    (timestamp isNil and:[handle notNil]) ifTrue:[
+        timestamp := Timestamp new osTime: handle when time
+    ].
+    ^timestamp
+
+    "Modified: / 19-09-2012 / 01:20:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!GitSignature methodsFor:'private-accessing'!
+
+getHandleClass
+    ^GitSignatureStructure
+
+    "Created: / 19-09-2012 / 01:27:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+setHandle: hndl
+    self assert: (hndl isNil or:[hndl class == self getHandleClass]).
+    handle := hndl.
+
+    "Created: / 19-09-2012 / 01:28:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!GitSignature class methodsFor:'documentation'!
+
+version_SVN
+    ^ '$Id::                                                                                                                        $'
+! !