equal
deleted
inserted
replaced
|
1 "{ Encoding: utf8 }" |
|
2 |
|
3 "{ Package: 'stx:libbasic' }" |
|
4 |
|
5 "{ NameSpace: CharacterEncoderImplementations }" |
|
6 |
|
7 CharacterEncoder subclass:#TwoByteEncoder |
|
8 instanceVariableNames:'' |
|
9 classVariableNames:'' |
|
10 poolDictionaries:'' |
|
11 category:'Collections-Text-Encodings' |
|
12 ! |
|
13 |
|
14 TwoByteEncoder class instanceVariableNames:'mySingleInstance' |
|
15 |
|
16 " |
|
17 No other class instance variables are inherited by this class. |
|
18 " |
|
19 ! |
|
20 |
|
21 |
|
22 !TwoByteEncoder class methodsFor:'instance creation'! |
|
23 |
|
24 new |
|
25 "singleton - there is only one" |
|
26 |
|
27 mySingleInstance isNil ifTrue:[ |
|
28 mySingleInstance := self basicNew initialize. |
|
29 ]. |
|
30 ^ mySingleInstance |
|
31 ! ! |
|
32 |
|
33 !TwoByteEncoder class methodsFor:'private'! |
|
34 |
|
35 flushSingletons |
|
36 mySingleInstance := nil. |
|
37 super flushSingletons |
|
38 |
|
39 " |
|
40 self flushSingletons |
|
41 " |
|
42 ! ! |
|
43 |
|
44 !TwoByteEncoder class methodsFor:'queries'! |
|
45 |
|
46 maxCode |
|
47 ^ 16rFFFF |
|
48 ! |
|
49 |
|
50 minCode |
|
51 ^ 0 |
|
52 ! ! |
|
53 |
|
54 !TwoByteEncoder class methodsFor:'testing'! |
|
55 |
|
56 isAbstract |
|
57 self == TwoByteEncoder ifTrue:[^ true]. |
|
58 ^ super isAbstract |
|
59 ! ! |
|
60 |
|
61 !TwoByteEncoder methodsFor:'private'! |
|
62 |
|
63 newString:size |
|
64 ^ TwoByteString uninitializedNew:size |
|
65 ! ! |
|
66 |
|
67 !TwoByteEncoder class methodsFor:'documentation'! |
|
68 |
|
69 version |
|
70 ^ '$Header: /cvs/stx/stx/libbasic/Attic/Encoder_TwoByteEncoder.st,v 1.1 2004-03-05 17:12:27 cg Exp $' |
|
71 ! ! |