GDBThreadGroupType.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 01 Oct 2014 02:04:11 +0100
changeset 51 2fa20404923c
child 78 c24e7d8bc881
permissions -rw-r--r--
Introduced GDBThreadGroupType. Currently, there's only type 'process' as it is the only type supported by GDB.

"{ Package: 'jv:libgdbs' }"

Object subclass:#GDBThreadGroupType
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'GDB-Core'
!

GDBThreadGroupType class instanceVariableNames:'theOneAndOnlyInstance'

"
 No other class instance variables are inherited by this class.
"
!

!GDBThreadGroupType class methodsFor:'instance creation'!

flushSingleton
    "flushes the cached singleton"

    theOneAndOnlyInstance := nil

    "
     self flushSingleton
    "
!

new
    "returns a singleton"

    ^ self theOneAndOnlyInstance.
!

theOneAndOnlyInstance
    "returns a singleton"

    self == GDBThreadGroupType ifTrue:[ 
        self error: 'GDBThreadGroupType is an abstract superclass'
    ].
    theOneAndOnlyInstance isNil ifTrue:[
        theOneAndOnlyInstance := self basicNew initialize.
    ].
    ^ theOneAndOnlyInstance.

    "Modified: / 01-10-2014 / 01:27:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!GDBThreadGroupType class methodsFor:'testing'!

isAbstract
    ^ self == GDBThreadGroupType
! !