Design Patterns : Elements of Reusable Object-Oriented Software


Design Patterns: Elements of Reusable Object-Oriented Software



Download 4,06 Mb.
Pdf ko'rish
bet73/288
Sana07.04.2022
Hajmi4,06 Mb.
#535140
1   ...   69   70   71   72   73   74   75   76   ...   288
Bog'liq
GOF Design Patterns

Design Patterns: Elements of Reusable Object-Oriented Software 
92 
attributessuch as color, font, and coordinate transformations, plus operationsfor 
more sophisticated child management. 
5
An integer index is probably not the best way to specifya glyph's children, 
depending on the data structure the glyph uses.If it stores its children in a 
linked list, then a pointer into thelist would be more efficient. We'll see a 
better solution to theindexing problem in Section 2.8, when we discuss document 
analysis. 
6
The user will have even more to say about thedocument's 
logical
structure

the 
sentences, paragraphs,sections, chapters, and so forth. The 
physical
structure 
is lessinteresting by comparison. Most people don't care where the linebreaksin 
a paragraph occur as long as the paragraph is formatted properly.The same is true 
for formatting columns and pages. Thus users end upspecifying only high-level 
constraints on the physical structure,leaving Lexi to do the hard work of 
satisfying them. 
7
The compositor must get the character codes ofCharacter glyphs in order to compute 
the linebreaks. In Section 2.8 we'll see howto get this information polymorphically 
without adding acharacter-specific operation to the Glyph interface. 
8
That is, redoing an operation that was just undone. 
9
Conceptually, the client is Lexi's user, but inreality it's another object (such 
as an event dispatcher) thatmanages inputs from the user. 
10
We could use function overloading to give each of these memberfunctions the same 
name, since their parameters already differentiatethem. We've given them different 
names here to emphasize theirdifferences, especially when they're called. 
11
IsMisspelled implements the spellingalgorithm, which we won't detail here 
because we've made itindependent of Lexi's design. We can support different 
algorithmsby subclassing SpellingChecker; alternatively, we canapply the Strategy 
(349) pattern (as we did for formatting in Section 2.3) to supportdifferent 
spelling checking algorithms. 
12
"Visit" is just a slightly moregeneral term for "analyze." It foreshadows the 
terminology we use inthe design pattern we're leading to. 



Download 4,06 Mb.

Do'stlaringiz bilan baham:
1   ...   69   70   71   72   73   74   75   76   ...   288




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish