Muutke küpsiste eelistusi

E-raamat: Software Application Development: A Visual C++, MFC, and STL Tutorial

(Institute of High Performance Computing, Singapore), (Institute of High Performance Computing, Singapore), (Institute of High Performance Computing, Singapore)
  • Formaat - PDF+DRM
  • Hind: 103,99 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Software Application Development: A Visual C++, MFC, and STL Tutorial provides a detailed account of the software development process using Visual C++, MFC, and STL. It covers everything from the design to the implementation of all software modules, resulting in a demonstration application prototype which may be used to efficiently represent mathematical equations, perform interactive and intuitive model-building, and conduct control engineering experiments.

All computer code is included, allowing developers to extend and reuse the software modules for their own project work. The books tutorial-like approach empowers students and practitioners with the knowledge and skills required to perform disciplined, quality, real-world software engineering.
Preface xxvii
Acknowledgments xxix
Introduction xxxi
Authors xxxvii
PART I User Interaction
Chapter 1 Object-Oriented Analysis and Design
3(14)
1.1 Introduction
3(1)
1.2 Background Research
4(1)
1.3 Software Requirements
4(1)
1.4 General Use Case Narratives
5(1)
1.5 Use Case Scenarios and Conversations
5(3)
1.5.1 Scenario
6(2)
1.5.2 Conversation
8(1)
1.6 Noun and Verb Analysis
8(1)
1.7 Object Analysis
8(1)
1.8 Preliminary Class Diagram
9(4)
1.9 Basic Program Implementing the Class Structure
13(2)
1.10 Summary
15(2)
References
15(2)
Chapter 2 Initial Graphical User Interface
17(26)
2.1 Introduction
17(1)
2.2 Application Wizard
17(1)
2.3 Menus
17(3)
2.4 Application Icon
20(1)
2.5 Toolbars
21(9)
2.5.1 Inserting a Common Operations Toolbar
21(1)
2.5.2 Inserting a Common Blocks Toolbar
22(1)
2.5.3 Attaching the Toolbars to the Application Frame
23(2)
2.5.4 Controlling the Toolbar Visibility
25(2)
2.5.5 Add Event-Handler Functions for the Menu Entries
27(2)
2.5.6 Add Event-Handler Functions for the Common Blocks Toolbar Buttons
29(1)
2.6 Block Library Dialog Window
30(11)
2.6.1 Insert a New Dialog Resource
30(1)
2.6.2 Attach a Class to the Dialog Window
31(2)
2.6.3 Menu Entry and Toolbar Button Event-Handling Functions
33(1)
2.6.4 Attach Variables to the Controls
33(1)
2.6.5 Add Functionality for the Block Library Dialog Buttons
34(1)
2.6.5.1 Disable Duplicate Check Boxes
34(1)
2.6.5.2 Add All Blocks
35(5)
2.6.5.3 Uncheck All Blocks
40(1)
2.7 Add Functionality to the Common Blocks Toolbar Buttons
41(1)
2.8 Summary
41(2)
References
41(2)
Chapter 3 Constructing Blocks
43(54)
3.1 Introduction
43(1)
3.2 Merging the WIN32 Console Application with the Visual C++ Application
43(3)
3.3 Modifying Program Structure for Block Construction
46(8)
3.3.1 Preliminary Changes
46(1)
3.3.1.1 Class CSystemModel
46(1)
3.3.1.2 Block Construction Code
47(1)
3.3.1.3 Class CBlock
48(2)
3.3.2 Introduce a New CBlock Constructor
50(1)
3.3.3 Add a Constructed Block to the Block List
51(2)
3.3.4 Check Object Construction
53(1)
3.4 Drawing of Primitive Block Shapes
54(8)
3.4.1 General Drawing Functionality
54(2)
3.4.2 Drawing an Ellipse Block
56(1)
3.4.3 Drawing a Rectangle Block
57(1)
3.4.4 Drawing a Triangle Block
58(2)
3.4.5 Automatic Assignment of Block Position
60(2)
3.5 Completing Block Construction
62(11)
3.5.1 Construction of a Gain Block
62(1)
3.5.2 Construction of a Sum Block
63(1)
3.5.3 Construction of All Remaining Blocks
64(1)
3.5.3.1 Construction of a Derivative Block
64(1)
3.5.3.2 Construction of a Divide Block
65(1)
3.5.3.3 Construction of an Integrator Block
66(1)
3.5.3.4 Construction of a Linear Function Block
66(1)
3.5.3.5 Construction of an Output Block
67(1)
3.5.3.6 Construction of a Signal Generator Block
68(1)
3.5.3.7 Construction of a Subsystem Block
68(1)
3.5.3.8 Construction of a Subsystem In Block
69(1)
3.5.3.9 Construction of a Subsystem Out Block
70(1)
3.5.3.10 Construction of a Transfer Function Block
70(2)
3.5.3.11 Check Construction of System Model
72(1)
3.6 Drawing Block Graphical Detail
73(23)
3.6.1 Implementing Functionality to Draw Detail
73(1)
3.6.1.1 CConstantBlock::DrawBlock()
74(1)
3.6.1.2 CGainBlock::DrawBlock()
75(1)
3.6.1.3 CSumBlock::DrawBlock()
76(1)
3.6.1.4 CDerivativeBlock::DrawBlock()
77(2)
3.6.1.5 CDivideBlock::DrawBlock()
79(2)
3.6.1.6 CIntegratorBlock::DrawBlock()
81(2)
3.6.1.7 CLinearFnBlock::DrawBlock()
83(1)
3.6.1.8 COutputBlock::DrawBlock()
84(2)
3.6.1.9 CSignalGeneratorBlock::DrawBlock()
86(2)
3.6.1.10 CSubsystemBlock::DrawBlock()
88(1)
3.6.1.11 CSubsystemInBlock::DrawBlock()
89(3)
3.6.1.12 CSubsystemOutBlock::DrawBlock()
92(2)
3.6.1.13 CTransferFnBlock::DrawBlock()
94(2)
3.6.2 Display of Block Graphics
96(1)
3.7 Summary
96(1)
References
96(1)
Chapter 4 Constructing Block Ports
97(24)
4.1 Introduction
97(1)
4.2 Block-Based Port Position
97(5)
4.2.1 Ports on an Ellipse Block
97(1)
4.2.2 Ports on a Rectangle Block
98(1)
4.2.3 Ports on a Triangle Block
99(3)
4.3 Changing the CPort Class
102(6)
4.3.1 CPort Member Variables
102(1)
4.3.2 CPort Member Methods
103(1)
4.3.2.1 Accessor Methods
103(1)
4.3.2.2 Calculate Port Position
104(4)
4.3.2.3 CPort Constructor
108(1)
4.4 Augmenting the CBlock Class
108(1)
4.5 Augmenting the CBlockShape Class
109(1)
4.6 Derived-Block Constructors
110(3)
4.6.1 CConstantBlock Constructor
110(1)
4.6.2 Check the System Model
111(1)
4.6.3 Augmenting the Remaining Block Constructors
112(1)
4.7 Drawing Ports
113(5)
4.7.1 Call CBlock::DrawBlockPorts()
113(1)
4.7.2 Add CBlock::DrawBlockPorts()
114(1)
4.7.3 Add CPort::DrawPort()
114(3)
4.7.4 Display of Block Ports
117(1)
4.8 Summary
118(3)
Chapter 5 Constructing Connections
121(16)
5.1 Introduction
121(1)
5.2 Adding Connections to the DiagramEng Project
121(9)
5.2.1 Augment the CConnection Class
121(1)
5.2.2 Add a Function to Add the Connection to the List
122(1)
5.2.3 Add a Function to Get the Connection List
122(1)
5.2.4 Add an OnLButtonDown() Function
123(1)
5.2.5 Add an OnMouseMove() Function
123(1)
5.2.6 Add an OnLButtonUp() Function
124(1)
5.2.7 Draw Connections
125(4)
5.2.8 Build and Run the Project
129(1)
5.3 Context Menu
130(5)
5.3.1 Insert a Context Menu
130(1)
5.3.2 Add an Event-Handler Function for the Context Menu
130(1)
5.3.3 Set the Context Menu Point
131(1)
5.3.4 Attach Event-Handler Functions for the Context Menu Entries
131(1)
5.3.4.1 Item Deletion
132(2)
5.3.4.2 Set Item Properties
134(1)
5.3.5 System Model-Based Object Deletion
134(1)
5.4 Summary
135(2)
References
135(2)
Chapter 6 Moving Blocks and Connections
137(32)
6.1 Introduction
137(1)
6.2 Moving Blocks
137(4)
6.2.1 CRectTracker Class
137(1)
6.2.2 Augmenting the OnLButtonDown() Function
137(2)
6.2.3 Moving a Block
139(1)
6.2.4 Set Block Position
140(1)
6.3 Moving Connection End Points
141(10)
6.3.1 Move a Connection End Point
141(3)
6.3.2 Snap Connection End Points to a Port
144(1)
6.3.2.1 Augment TrackConnectionEndPoint()
144(3)
6.3.2.2 Augment SetBlockPosition()
147(2)
6.3.3 Unsnap Connection End Points from a Port
149(2)
6.4 Inserting and Moving Connection-Based Bend Points
151(11)
6.4.1 Augment the Context Menu with an Insert Bend Point Operation
151(4)
6.4.2 Drawing a Connection with Head, Tail, and Bend Points
155(1)
6.4.2.1 DrawConnection()
155(1)
6.4.2.2 Amend DrawArrowHead()
156(2)
6.4.2.3 Interaction Problem Concerning Invisible Connections
158(1)
6.4.3 Moving a Connection-Based Bend Point
159(3)
6.5 Deletion of Connections and Bend Points
162(5)
6.5.1 Deletion of a Bend Point
162(2)
6.5.2 Deletion of a Connection
164(3)
6.6 Summary
167(2)
References
168(1)
Chapter 7 Automatic Block Placement
169(8)
7.1 Introduction
169(1)
7.2 Hypothetical Interactive Block Positioning
169(3)
7.3 Actual Improved Automatic Block Positioning
172(3)
7.4 Summary
175(2)
Chapter 8 Connection-Based Bend Points
177(26)
8.1 Introduction
177(1)
8.2 Attaching a Connection Tail Point to a Bend Point
177(10)
8.2.1 Amend the TrackConnectionEndPoint() Function
179(1)
8.2.2 Add Member Variables and Methods to the CConnection Class
180(1)
8.2.3 Add a SnapConnectionTailPointToBendPoint() Function
181(1)
8.2.4 Problem Concerning the Connection Tail Point
182(5)
8.3 Deletion of a Bend Point to Which a Connection Is Attached
187(2)
8.4 Deletion of a Connection with a Bend Point to Which a Connection Is Attached
189(2)
8.5 Problem Concerning the Insertion of Bend Points
191(5)
8.6 Automatic Attachment of Connection End Points upon Initial Construction
196(4)
8.7 Deletion of Blocks with Attached Connections
200(2)
8.8 Summary
202(1)
Chapter 9 Block Dialog Windows
203(48)
9.1 Introduction
203(1)
9.2 Processing a Left-Button-Double-Click Event
203(1)
9.3 Adding Dialog Windows to Accept User Input
204(46)
9.3.1 Constant Block Dialog
205(1)
9.3.1.1 Insert a New Dialog Window and Add Controls
205(1)
9.3.1.2 Attach a Class to the Dialog Window
205(1)
9.3.1.3 Attach Variables to the Dialog Window Controls
206(1)
9.3.1.4 Add Functionality to the Dialog Window Buttons
207(1)
9.3.1.5 Add Functionality to Initialize Variables
208(1)
9.3.1.6 Add the Overriding BlockDlgWndParameterInput() Function
208(2)
9.3.1.7 Combined Left-Button-Down and Left-Button-Double-Click Problem
210(2)
9.3.2 Derivative Block Dialog
212(1)
9.3.2.1 Insert a New Dialog Window and Add Controls
212(1)
9.3.2.2 Attach a Class to the Dialog Window
212(1)
9.3.2.3 Attach Variables to the Dialog Window Controls
213(1)
9.3.2.4 Add Functionality to the Dialog Window Buttons
213(1)
9.3.2.5 Add Functionality to Initialize Variables
214(1)
9.3.2.6 Add the Overriding BlockDlgWndParameterInput() Function
214(1)
9.3.3 Divide Block Dialog
214(1)
9.3.3.1 Insert a New Dialog Window and Add Controls
215(1)
9.3.3.2 Attach a Class to the Dialog Window
215(1)
9.3.3.3 Attach Variables to the Dialog Window Controls
216(1)
9.3.3.4 Add Functionality to the Dialog Window Buttons
216(1)
9.3.3.5 Add Functionality to Initialize Variables
217(1)
9.3.3.6 Add the Overriding BlockDlgWndParameterInput() Function
217(1)
9.3.4 Gain Block Dialog
218(1)
9.3.4.1 Insert a New Dialog Window and Add Controls
218(1)
9.3.4.2 Attach a Class to the Dialog Window
218(1)
9.3.4.3 Attach Variables to the Dialog Window Controls
218(1)
9.3.4.4 Add Functionality to the Dialog Window Buttons
218(2)
9.3.4.5 Add Functionality to Initialize Variables
220(1)
9.3.4.6 Add the Overriding BlockDlgWndParameterInput() Function
221(1)
9.3.5 Integrator Block Dialog
221(1)
9.3.5.1 Insert a New Dialog Window and Add Controls
221(1)
9.3.5.2 Attach a Class to the Dialog Window
221(1)
9.3.5.3 Attach Variables to the Dialog Window Controls
221(2)
9.3.5.4 Add Functionality to the Dialog Window Buttons
223(1)
9.3.5.5 Add Functionality to Initialize Variables
223(1)
9.3.5.6 Add the Overriding BlockDlgWndParameterInput() Function
224(1)
9.3.6 Linear Function Block Dialog
224(1)
9.3.6.1 Insert a New Dialog Window and Add Controls
224(1)
9.3.6.2 Attach a Class to the Dialog Window
224(1)
9.3.6.3 Attach Variables to the Dialog Window Controls
225(1)
9.3.6.4 Add Functionality to the Dialog Window Buttons
226(1)
9.3.6.5 Add Functionality to Initialize Variables
227(1)
9.3.6.6 Add the Overriding BlockDlgWndParameterInput() Function
227(1)
9.3.7 Output Block Dialog
228(1)
9.3.7.1 Insert a New Dialog Window and Add Controls
228(1)
9.3.7.2 Attach a Class to the Dialog Window
228(1)
9.3.7.3 Attach Variables to the Dialog Window Controls
229(1)
9.3.7.4 Add Functionality to the Dialog Window Buttons
229(1)
9.3.7.5 Add Functionality to Initialize Variables
230(1)
9.3.7.6 Add the Overriding BlockDlgWndParameterInput() Function
230(1)
9.3.8 Signal Generator Block Dialog
231(1)
9.3.8.1 Insert a New Dialog Window and Add Controls
231(1)
9.3.8.2 Attach a Class to the Dialog Window
231(1)
9.3.8.3 Attach Variables to the Dialog Window Controls
231(2)
9.3.8.4 Add Functionality to the Dialog Window Buttons
233(1)
9.3.8.5 Add Functionality to Initialize Variables
233(1)
9.3.8.6 Add the Overriding BlockDlgWndParameterInput() Function
234(1)
9.3.9 Subsystem Block Dialog
235(1)
9.3.9.1 Insert a New Dialog Window and Add Controls
235(1)
9.3.9.2 Attach a Class to the Dialog Window
235(1)
9.3.9.3 Attach Variables to the Dialog Window Controls
236(1)
9.3.9.4 Add Functionality to the Dialog Window Buttons
236(1)
9.3.9.5 Add Functionality to Initialize Variables
237(1)
9.3.9.6 Add the Overriding BlockDlgWndParameterInput() Function
237(1)
9.3.10 Subsystem In Block Dialog
237(1)
9.3.10.1 Insert a New Dialog Window and Add Controls
238(1)
9.3.10.2 Attach a Class to the Dialog Window
238(1)
9.3.10.3 Attach Variables to the Dialog Window Controls
238(1)
9.3.10.4 Add Functionality to the Dialog Window Buttons
239(1)
9.3.10.5 Add Functionality to Initialize Variables
239(1)
9.3.10.6 Add the Overriding BlockDlgWndParameterInput() Function
240(1)
9.3.11 Subsystem Out Block Dialog
240(1)
9.3.11.1 Insert a New Dialog Window and Add Controls
240(1)
9.3.11.2 Attach a Class to the Dialog Window
240(1)
9.3.11.3 Attach Variables to the Dialog Window Controls
241(1)
9.3.11.4 Add Functionality to the Dialog Window Buttons
241(1)
9.3.11.5 Add Functionality to Initialize Variables
242(1)
9.3.11.6 Add the Overriding BlockDlgWndParameterInput() Function
242(1)
9.3.11.7 Synchronizing the Subsystem-Related Block Values
243(1)
9.3.12 Sum Block Dialog
243(1)
9.3.12.1 Insert a New Dialog Window and Add Controls
243(1)
9.3.12.2 Attach a Class to the Dialog Window
243(1)
9.3.12.3 Attach Variables to the Dialog Window Controls
244(1)
9.3.12.4 Add Functionality to the Dialog Window Buttons
244(1)
9.3.12.5 Add Functionality to Initialize Variables
245(1)
9.3.12.6 Add the Overriding BlockDlgWndParameterInput() Function
245(1)
9.3.13 Transfer Function Block Dialog
246(1)
9.3.13.1 Insert a New Dialog Window and Add Controls
247(1)
9.3.13.2 Attach a Class to the Dialog Window
247(1)
9.3.13.3 Attach Variables to the Dialog Window Controls
248(1)
9.3.13.4 Add Functionality to the Dialog Window Buttons
248(1)
9.3.13.5 Add Functionality to Initialize Variables
249(1)
9.3.13.6 Add the Overriding BlockDlgWndParameterInput() Function
249(1)
9.4 Summary
250(1)
References
250(1)
Chapter 10 Conversion of String Input to Double Data
251(28)
10.1 Introduction
251(1)
10.2 Conversion of CString Input Strings to Double Member Data
251(13)
10.2.1 Add a Global ConvertStringToDouble() Function
253(3)
10.2.2 Add a Global StripInputString() Function
256(2)
10.2.3 Add a Global Data-Dimension-Determining Function
258(3)
10.2.4 Add a Global ConvertStringMatrixToDoubleMatrix() Function
261(2)
10.2.5 Add Global Diagnostic Printing Functions
263(1)
10.3 Augmenting the CBlock-Derived Classes
264(13)
10.3.1 Augment the CConstantBlock Class
264(3)
10.3.2 Augment the CGainBlock Class
267(2)
10.3.3 Augment the CIntegratorBlock Class
269(4)
10.3.4 Augment the CTransferFnBlock Class
273(4)
10.4 Summary
277(2)
Reference
277(2)
Chapter 11 Moving Multiple Items
279(14)
11.1 Introduction
279(1)
11.2 Edit the TrackItem() Function to Call TrackMultipleItems()
279(1)
11.3 Add a TrackMultipleItems() Function to CDiagramEngDoc
280(6)
11.3.1 Add the DetermineCurrentAndIntersectRects() Function
285(1)
11.3.2 Add the DetermineTrackerDeltaPosition() Function
286(1)
11.4 Add a Function for a Key-Down Event to CDiagramEngView
286(1)
11.5 Add Key-Flag-Based Members to CDiagramEngDoc
287(2)
11.6 Flow of Control in the TrackMultipleItems() Function
289(1)
11.7 Add a Toolbar Button to Activate Multiple Item Tracking
290(1)
11.8 Summary
291(2)
Reference
291(2)
Chapter 12 Addition of a Tree View Control
293(28)
12.1 Introduction
293(1)
12.2 Add a Tree View Control Dialog Window
293(14)
12.2.1 Insert a Dialog Window and Add Controls
293(1)
12.2.2 Attach a Class to the Dialog Window
293(1)
12.2.3 Add Functionality to Invoke the Tree View Dialog
294(2)
12.2.4 Attach a Variable to the Dialog Window Control
296(1)
12.2.5 Add the OnInitDialog() Function to the CTreeDialog Class
297(2)
12.2.6 Add Icons to the Tree View Control
299(5)
12.2.7 Add an Event-Handler Function for Tree View Node Selection
304(3)
12.3 Docking of the Tree Dialog Window as a Tree Dialog Bar
307(9)
12.3.1 Step 1: Change the Base Class from CDialog to CDialogBar
308(1)
12.3.2 Step 2: Change the Constructor and DoDataExchange() Methods
308(1)
12.3.3 Step 3: Add a New Declaration for the OnInitDialog() Function with Different Parameters
309(2)
12.3.4 Step 4: Alter the Message Map to Invoke the OnInitDialog() Function
311(1)
12.3.5 Step 5: Add the Implementation of the New OnInitDialog() Function
311(1)
12.3.6 Step 6: Alter the Dialog Box Resource Styles
312(1)
12.3.7 Step 7: Add an Instance of the CDialogBar to the CMainFrame Class
312(1)
12.3.8 Step 8: Invoke the Create() Method for the New CDialogBar Instance
313(3)
12.3.9 Step 9: Add Support for Dynamic Docking and Resizing of the CDialogBar Instance
316(1)
12.4 Resetting the Appropriate Dialog
316(1)
12.5 Controlling the Toolbar Visibility
317(2)
12.6 Summary
319(2)
References
319(2)
Chapter 13 Review of Menu and Toolbar-Based Functionality: Part I
321(10)
13.1 Introduction
321(1)
13.2 Menus
321(4)
13.2.1 Main Frame-Based Menus
321(1)
13.2.2 Child Frame-Based Menus
321(1)
13.2.3 Context Menu
321(4)
13.3 Toolbars
325(2)
13.3.1 Main Frame Toolbar
325(1)
13.3.2 Common Operations Toolbar
326(1)
13.3.3 Common Blocks Toolbar
327(1)
13.4 Functionality to be Added
327(3)
13.4.1 Child Frame-Based Menu Items
327(2)
13.4.2 Context Menu Items
329(1)
13.4.3 Toolbar Button-Based Functionality
329(1)
13.5 Summary
330(1)
Chapter 14 Context Menu Extension
331(16)
14.1 Introduction
331(1)
14.2 Numerical Solver Dialog Window
331(6)
14.2.1 Insert a New Dialog Window and Add Controls
331(2)
14.2.2 Attach a Class to the Dialog Window
333(1)
14.2.3 Attach Variables to the Dialog Window Controls
333(1)
14.2.4 Add Functionality to the Dialog Window Buttons
333(1)
14.2.5 Add Functionality to Initialize Variables
334(1)
14.2.6 Add a Dialog Window Parameter Input Function to the Underlying Class
335(2)
14.2.7 Call the Dialog Window Parameter Input Function
337(1)
14.3 Deleting Multiple Grouped Items
337(6)
14.3.1 Change the Name of the Edit Menu Entry
338(1)
14.3.2 Add a Delete Grouped Items Entry to the Context Menu
338(1)
14.3.3 Add an Event-Handler Function to Delete Grouped Items
338(5)
14.4 Setting of Item Properties
343(2)
14.5 Summary
345(2)
Reference
345(2)
Chapter 15 Setting Port Properties
347(52)
15.1 Introduction
347(1)
15.2 Setting Divide Block Ports
347(8)
15.2.1 Reset Input Ports
347(4)
15.2.2 Calculate Port Position Angles
351(2)
15.2.3 Reset Output Ports
353(2)
15.3 Setting Sum Block Ports
355(8)
15.3.1 Reset Input Ports
355(3)
15.3.2 Calculate Port Position Angles
358(3)
15.3.3 Reset Output Ports
361(2)
15.4 Drawing Ports Depending on Connection Status
363(2)
15.5 Drawing Port Signs
365(8)
15.6 Preparation for Adjustment of Port Properties
373(4)
15.7 Dialog-Based Port Property Setting
377(13)
15.7.1 Insert a Dialog Window and Add Controls
378(1)
15.7.2 Attach a Class to the Dialog Window
378(1)
15.7.3 Attach Variables to the Dialog Window Controls
378(5)
15.7.4 Add Functionality to the Dialog Window Buttons
383(1)
15.7.5 Add Overriding Versions of the SetPortProperties() Function
383(7)
15.8 Deleting Ports
390(7)
15.9 Summary
397(2)
Chapter 16 Key-Based Item Movement
399(14)
16.1 Introduction
399(1)
16.2 Add a Fine Move Item Entry to the Context Menu
399(1)
16.3 Add Members to the CDiagramEngDocClass
400(1)
16.4 Edit the CDiagramEngView::OnKeyDown() Function
401(1)
16.5 AddaFineMoveItem() Function
402(1)
16.6 Add a FineMoveBlock() Function
402(4)
16.7 Add a FineMoveConnectionBendPoint() Function
406(3)
16.8 Fine Movement Process Control Flow
409(2)
16.9 Summary
411(2)
Reference
411(2)
Chapter 17 Reversing Block Direction
413(8)
17.1 Introduction
413(1)
17.2 Add a Reverse Block Entry to the Context Menu
413(2)
17.3 Add a ReverseBlockDirection() Function to CBlock Class
415(1)
17.4 Add Accessor Methods to the CBlockShape Class
416(1)
17.5 Add Accessor Methods to the CPort Class
417(1)
17.6 Test the Application
417(1)
17.7 Summary
418(3)
PART II Model Computation and Data
Chapter 18 Model Validation
421(26)
18.1 Introduction
421(1)
18.2 Validating a Model
421(14)
18.2.1 Validate Model Blocks
424(2)
18.2.2 Validate Model Block Ports
426(5)
18.2.3 Validate Model Connections
431(4)
18.3 Changes to be Made to Draw in the Correct Color
435(6)
18.3.1 Modify the CSystemModel::DrawSystemModel() Function
436(1)
18.3.2 Modify the CConnection::DrawConnection() Function
437(1)
18.3.3 Modify the CConnection::DrawArrowHead() Function
438(3)
18.4 Unique Port and Bend Point Connection
441(5)
18.4.1 Augment the SnapConnectionHeadPointToPort() Function
441(2)
18.4.2 Augment the SnapConnectionTailPointToPort() Function
443(3)
18.5 Summary
446(1)
Reference
446(1)
Chapter 19 Non-Feedback-Based Signal Propagation
447(50)
19.1 Introduction
447(1)
19.2 Signals and Systems
447(2)
19.2.1 Continuous-Time and Discrete-Time Signals
447(1)
19.2.2 Continuous-Time and Discrete-Time Systems
447(1)
19.2.3 Memory-Based Systems and Memoryless Systems
448(1)
19.2.4 Time Variant and Time Invariant Systems
448(1)
19.2.5 Linear and Nonlinear Systems
449(1)
19.2.6 State Variables, State Vectors, and State Space
449(1)
19.3 Models with Algebraic and Feedback Loops
449(2)
19.4 Signal Propagation
451(1)
19.5 Determination of Feedback Loops
452(21)
19.5.1 General Steps to Determine Feedback Loops
452(2)
19.5.1.1 Determine Model Feedback Loops
454(3)
19.5.1.2 Set Reference-From Port of Connection Emanating from a Bend Point
457(2)
19.5.1.3 Assign Block Connectivity Matrix Values
459(1)
19.5.1.4 Determine Loops from Connectivity Matrix
460(2)
19.5.2 Determining Loops from the Connectivity Matrix
462(1)
19.5.2.1 Determine Initial Node Vector
462(1)
19.5.2.2 Build Tour
463(4)
19.5.2.3 Find Current Tour Position
467(1)
19.5.2.4 Find Branch Nodes
467(1)
19.5.2.5 Number of Ones on Matrix Row
468(1)
19.5.2.6 Check Repeated Entries
468(1)
19.5.2.7 Reset Tour Vector
469(1)
19.5.2.8 Save Tour Vector
469(1)
19.5.2.9 Print Integer Matrix
470(1)
19.5.2.10 Print Integer Vector
471(1)
19.5.2.11 Running the Application
472(1)
19.6 Signal-Based Class Structure
473(1)
19.7 Additions Required for Direct Signal Propagation
474(10)
19.7.1 Addition of Signal Propagation Code
474(1)
19.7.1.1 Add Code to the CDiagramEngDoc::OnSimStart() Function
475(1)
19.7.1.2 Modify the CSystemModel::ValidateModel() Function
476(1)
19.7.1.3 Modify the CDiagramEngDoc::OnModelBuild() Function
476(1)
19.7.1.4 Add a CSystemModel::GetNFeedbackLoops() Function
477(1)
19.7.1.5 Add a CSystemModel::SignalPropagationDirect() Function
477(4)
19.7.1.6 Add a CSystemModel::DetermineNTimeSteps() Function
481(1)
19.7.1.7 Add a CSignal::ResetSignalData() Function
482(1)
19.7.1.8 Add a CSystemModel::SignalPropagationSystemOfEquations() Function
483(1)
19.7.1.9 Add a Virtual CBlock::OperateOnData() Function
483(1)
19.8 Propagating a Simple Direct Signal
484(11)
19.8.1 Implementation of Simple Signal Propagation
485(1)
19.8.1.1 Add a CConstantBlock::OperateOnData() Function
485(1)
19.8.1.2 Add a COutputBlock::OperateOnData() Function
485(4)
19.8.1.3 Add a CBlock::WriteDataToOutputSignal() Function
489(1)
19.8.1.4 Add a CBlock::ReadDataFromSingleInputSignal() Function
490(2)
19.8.1.5 Add Accessor Methods to Get and Set Signal Data and Validity
492(2)
19.8.2 Running an Experiment
494(1)
19.9 Summary
495(2)
References
495(2)
Chapter 20 Graph Drawing
497(36)
20.1 Introduction
497(1)
20.2 Addition of Structure to Display an Empty View Window
497(9)
20.2.1 Add a Show Graph Button to the Output Block Dialog
497(2)
20.2.2 Add a CDocTemplate Object and Accessor Function to the CDiagramEngApp Class
499(1)
20.2.3 Modify CDiagramEngApp::InitInstance() to Create a CMultiDocTemplate Object
499(2)
20.2.4 Add a COutputBlockView Class to Support Drawing within Its View
501(2)
20.2.5 Add Template-Based Functionality to the Show Graph Event-Handler Function
503(2)
20.2.6 Add the OnInitialUpdate() and OnUpdate() Functions to the CDiagramEngView Class
505(1)
20.3 Supplementing Existing Classes to Access Output Block Data
506(4)
20.3.1 Add a Member Variable to the COutputBlockView Class
506(1)
20.3.2 Modify COutputBlock::BlockDlgWndParameterInput()
506(1)
20.3.3 Add a Member Variable to the COutputBlock Dialog Class
507(1)
20.3.4 Modify the COutputBlockDialog Constructor Declaration and Definition
508(1)
20.3.5 Add Code to COutputBlockDialog::OnOutputBlkDlgBtnShowGraph()
508(2)
20.3.6 Add Accessor Functions to the COutputBlockView Class
510(1)
20.4 Plotting Data as a Text String
510(2)
20.4.1 Add a COutputBlock::GetDataDimensions() Function
510(1)
20.4.2 Extend the COutputBlockView::OnDraw() Function
511(1)
20.5 Plotting Numerical Data as a Graph
512(10)
20.5.1 Modify OnDraw() in Preparation for Plotting Curves
512(2)
20.5.2 Add a COutputBlockView::DetermineMaxMinValues() Function
514(1)
20.5.3 Add DrawGraph() to the COutputBlockView Class
515(4)
20.5.4 Drawing Problem due to a Change in Active Document Status
519(1)
20.5.5 Add SelectGraphCurveColor() to the COutputBlockView Class
520(1)
20.5.6 Add GetTimeParameters() to the CSystemModel Class
521(1)
20.6 Deleting an Output Block and Its View
522(4)
20.6.1 Delete the Output Block View
523(1)
20.6.2 Modify CDiagramEngDoc::DeleteBlock()
524(1)
20.6.3 Modify CDiagramEngDoc::OnEditDeleteGroupedItems()
525(1)
20.7 Adding Functionality to the Output Block Dialog Window
526(5)
20.7.1 Add Accessor Functions to the COutputBlock Class
527(1)
20.7.2 Amend COutputBlockView::DrawGraph()
527(2)
20.7.3 Amend COutputBlock::BlockDlgWndParameterInput()
529(2)
20.8 Summary
531(2)
References
531(2)
Chapter 21 Block Operations
533(74)
21.1 Introduction
533(1)
21.2 Linear Function Block Data Operation
533(2)
21.3 Signal Generator Block Data Operation
535(3)
21.4 Gain Block Data Operation
538(6)
21.5 Sum Block Data Operation
544(5)
21.6 Derivative Block Data Operation
549(14)
21.6.1 Three-Point Derivative
549(1)
21.6.2 Five-Point Derivative
550(1)
21.6.3 Implementing the OperateOnData() Function
551(1)
21.6.3.1 Addition of an OperateOnData() Function
551(6)
21.6.3.2 Addition of the CalculateThreePointDerivative() Function
557(1)
21.6.3.3 Addition of the CalculateFivePointDerivative() Function
557(1)
21.6.3.4 Addition of Class Member Variables and Their Initialization
558(1)
21.6.3.5 Addition of a ResetBlockData() Function
559(1)
21.6.3.6 Addition of a ResetMemoryBasedBlockData() Function
560(1)
21.6.3.7 Testing the Derivative Block
561(2)
21.7 Integrator Block Data Operation
563(14)
21.7.1 Integration
563(2)
21.7.2 Truncation Error and Method Order
565(1)
21.7.3 Higher-Order Methods
566(1)
21.7.4 Implementing an Integration Function
566(2)
21.7.5 Implementing the OperateOnData() Function
568(1)
21.7.5.1 Addition of an OperateOnData() Function
568(6)
21.7.5.2 Addition of the EulerMethod() Function
574(1)
21.7.5.3 Addition of the GetIntegrationMethod() Function
574(1)
21.7.5.4 Addition of Class Member Variables and Their Initialization
575(1)
21.7.5.5 Addition of a ResetBlockData() Function
575(2)
21.7.6 Running an Experiment
577(1)
21.8 Divide Block Data Operation
577(28)
21.8.1 Implementing the OperateOnData() Function
578(3)
21.8.2 Implementing the DivideMultiplyOperation() Function
581(18)
21.8.3 Implementing the GaussJordanEliminationFullPivoting() Function
599(5)
21.8.4 Implementing the Swap() Function
604(1)
21.9 Remaining Block Operation Functions
605(1)
21.10 Summary
605(2)
References
606(1)
Chapter 22 Preparation for Feedback-Based Signal Propagation
607(60)
22.1 Introduction
607(1)
22.2 Linear Systems
607(1)
22.3 Nonlinear Systems
608(3)
22.3.1 Newton's Method
609(1)
22.3.2 Computing a Linear System with a Nonlinear Method
610(1)
22.4 Model Assumptions
611(11)
22.4.1 State-Space Equations
611(2)
22.4.2 Resorting of the Block List
613(3)
22.4.3 Saving Tour Vectors
616(3)
22.4.4 Get a Saved Tour Vector from a List
619(1)
22.4.5 Building a Block List from an Integer Array
620(2)
22.5 Determining Initial Output Signals
622(7)
22.5.1 Check Signal Validity
622(1)
22.5.2 Preliminary Signal Propagation for Models with Feedback Loops
623(6)
22.6 Adding Functionality to Set the Initial Output Signal
629(10)
22.6.1 Adding a Dialog Window to Allow User Input
629(1)
22.6.1.1 Insert a Dialog Window and Add Controls
630(1)
22.6.1.2 Attach a Class to the Dialog Window
630(1)
22.6.1.3 Attach Variables to the Dialog Window Controls
630(1)
22.6.1.4 Add Functionality to the Dialog Window Buttons
631(1)
22.6.1.5 Add Functionality to Initialize Variables
631(1)
22.6.2 Adding a Context Menu and Updating User Input
632(1)
22.6.2.1 Add a Context Menu Entry to Set the Initial Output Signal
633(1)
22.6.2.2 Add an Event-Handler Function Named OnSetOutputSignal()
633(1)
22.6.2.3 Add an AssignBlockOutputSignal() Function to Set the Signal Value
634(5)
22.7 Building the System of Equations Representing the Block Diagram
639(19)
22.7.1 Order of Operations to Compute a Model with Feedback Loops
640(5)
22.7.1.1 Preliminary Signal Propagation
645(1)
22.7.1.2 Data Dimensions
645(1)
22.7.1.3 Construction of System Signal Vector
646(1)
22.7.1.4 Construction of System Function Operation Vector
646(1)
22.7.1.5 Newton Solver
646(1)
22.7.1.6 Signal Vector Assignment
646(1)
22.7.1.7 Execution of Output Blocks
646(1)
22.7.1.8 Resetting of States
647(1)
22.7.2 Additional Functions Required to Compute a Model with Feedback Loops
647(1)
22.7.2.1 Determining the System Equations Data Dimensions
647(3)
22.7.2.2 Determining the System Equations Signal Vector
650(2)
22.7.2.3 Determining the System Equations Function Operation Vector
652(3)
22.7.2.4 Newton Method Iterative Solver
655(1)
22.7.2.5 Updating of the System Equations Signal Vector
655(3)
22.7.3 Testing the Code Structure
658(1)
22.8 Stopping a Simulation
658(7)
22.8.1 Augment the CSystemModel::SignalPropagationDirect() Method
660(1)
22.8.2 Augment CSystemModel::SignalPropagationSystemOfEquations()
661(1)
22.8.3 Add a CheckStopButtonPressed() Method to the CSystemModel Class
662(2)
22.8.4 Complete the CDiagramEngDoc::OnSimStop() Event-Handler Function
664(1)
22.9 Summary
665(2)
References
666(1)
Chapter 23 Feedback-Based Signal Propagation
667(66)
23.1 Introduction
667(1)
23.2 Newton-Method-Based Solver
667(2)
23.3 Object-Oriented Transformation of the Newton-Method-Based Solver
669(19)
23.3.1 Header File Used in the Object-Oriented Approach
670(2)
23.3.2 Source File Used in the Object-Oriented Approach
672(15)
23.3.3 Test Case Problems Computed Using Newton's Method
687(1)
23.3.3.1 Case 1
687(1)
23.3.3.2 Case 2
688(1)
23.3.3.3 Case 3
688(1)
23.3.3.4 Case 4
688(1)
23.3.3.5 Case 5
688(1)
23.4 Adding the Newton-Method-Based Solver to the DiagramEng Project
688(20)
23.4.1 Addition of Details to Complete the NewtonSolver() Function
689(1)
23.4.2 Addition of the CNewtonMethod Class with Member Declarations
690(2)
23.4.3 Addition of the CNewtonMethod Class Member Function Definitions
692(5)
23.4.4 Changes to be Made to Resolve Exiting the Program Prematurely
697(1)
23.4.4.1 Modify nrerror()
697(1)
23.4.4.2 Modify lnsrch()
698(1)
23.4.4.3 Modify ludcmp()
699(1)
23.4.4.4 Modify newt()
700(3)
23.4.4.5 Modify All nrerror() Calls Concerning Memory Allocation Failure
703(1)
23.4.4.6 Modify Relevant Functions to Process the Integer Returned from newt()
704(1)
23.4.5 Addition of the Manual Assertion Functions to the Project
705(3)
23.5 Convergence of the Newton Method Used to Compute Models with Feedback Loops
708(2)
23.6 Testing the Newton-Method-Based Code for Models with Feedback Loops
710(22)
23.6.1 Computing a Linear Problem with a Feedback Loop
710(1)
23.6.2 Computing an Ordinary Differential Equation Using a Feedback Loop
711(3)
23.6.3 Computing the Linear State Equations
714(1)
23.6.3.1 Mechanical System
715(5)
23.6.3.2 Electrical System
720(1)
23.6.4 Computing a Coupled Linear System
721(2)
23.6.5 Computing the Lotka-Volterra Equations
723(5)
23.6.6 Computing the Lorenz Equations
728(4)
23.7 Summary
732(1)
References
732(1)
Chapter 24 Placing an Edit Box on a Toolbar
733(10)
24.1 Introduction
733(1)
24.2 Edit the Resource File
733(1)
24.3 Create the Toolbar Edit Box
734(2)
24.4 Update the Toolbar Edit Box
736(4)
24.5 A Memory Leak
740(1)
24.6 Summary
741(2)
References
741(2)
Chapter 25 Serialization
743(86)
25.1 Introduction
743(1)
25.2 System Model Data Structure
743(8)
25.2.1 CSystemModel Data
744(1)
25.2.2 CBlock Data
744(1)
25.2.3 CBlockShape Data
745(1)
25.2.4 CPort Data
745(1)
25.2.5 CConnection Data
746(1)
25.2.6 CSignal Data
746(1)
25.2.7 Derived-Block Class Data
747(1)
25.2.7.1 CConstantBlock Data
747(1)
25.2.7.2 CDerivativeBlock Data
747(1)
25.2.7.3 CDivideBlock Data
747(1)
25.2.7.4 CGainBlock Data
747(1)
25.2.7.5 CIntegrator Data
748(1)
25.2.7.6 CLinearFnBlock Data
748(1)
25.2.7.7 COutputBlock Data
749(1)
25.2.7.8 CSignalGeneratorBlock Data
749(1)
25.2.7.9 CSubsystemBlock Data
749(1)
25.2.7.10 CSubsystemInBlock Data
749(1)
25.2.7.11 CSubsystemOutBlock Data
750(1)
25.2.7.12 CSumBlock Data
750(1)
25.2.7.13 CTransferFnBlock Data
751(1)
25.3 Event-Handler Functions for File Input/Output
751(19)
25.3.1 Child Frame-Based Event-Handler Functions
751(1)
25.3.1.1 CDiagramEngDoc::OnFileOpen()
752(3)
25.3.1.2 CDiagramEngDoc::ReadDiagramEngDataFromFile()
755(1)
25.3.1.3 CDiagramEngDoc::OnFileSaveAs()
755(1)
25.3.1.4 CDiagramEngDoc::OnFileSave()
756(1)
25.3.1.5 CDiagramEngDoc::OnFileClose()
757(1)
25.3.1.6 CDiagramEngApp::OnAppExit()
758(2)
25.3.1.7 CDiagramEngApp::SaveAllDocuments()
760(3)
25.3.1.8 CDiagramEngApp::OnFileRecentFileOpen()
763(4)
25.3.1.9 CDiagramEngDoc::OnWndCloseAllDocs()
767(1)
25.3.2 Main Frame-Based Event-Handler Functions
768(1)
25.3.2.1 CDiagramEngApp::OnFileOpen()
769(1)
25.4 Writing Data Members to a File
770(17)
25.4.1 Writing CDiagramEngDoc Data to a File
770(3)
25.4.2 Writing CSystemModel Data to a File
773(2)
25.4.3 Writing CBlock Data to a File
775(1)
25.4.4 Writing CBlockShape Data to a File
776(1)
25.4.5 Writing CPort Data to a File
776(1)
25.4.6 Writing Derived-Block Class Data to a File
777(1)
25.4.6.1 CConstantBlock::WriteBlockDataToFile()
777(1)
25.4.6.2 CDerivativeBlock::WriteBlockDataTofile()
777(1)
25.4.6.3 CDivideBlock::WriteBlockDataToFile()
778(1)
25.4.6.4 CGainBlock::WriteBlockDataToFile()
778(1)
25.4.6.5 CIntegratorBlock::WriteBlockDataToFile()
779(1)
25.4.6.6 CLinearFnBlock::WriteBlockDataToFile()
779(1)
25.4.6.7 COutputBlock::WriteBlockDataToFile()
780(1)
25.4.6.8 CSignalGeneratorBlock::WriteBlockDataToFile()
780(1)
25.4.6.9 CSubsystemBlock::WriteBlockDataToFile()
781(1)
25.4.6.10 CSubsystemInBlock::WriteBlockDataToFile()
781(1)
25.4.6.11 CSubsystemOutBlock::WriteBlockDataToFile()
782(1)
25.4.6.12 CSumBlock::WriteBlockDataToFile()
782(1)
25.4.6.13 CTransferFnBlock::WriteBlockDataToFile()
783(1)
25.4.7 Writing CConnection Data to a File
783(1)
25.4.8 Example of File Output
784(3)
25.5 Reading Data Members from a File
787(20)
25.5.1 Reading CSystemModel Data from a File
788(5)
25.5.2 Reading CConnection Data from a File
793(1)
25.5.3 Reading CBlock Data from a File
794(1)
25.5.4 Reading CBlockShape Data from a File
795(1)
25.5.5 Reading CPort Data from a File
796(1)
25.5.6 Reading Derived-Block Class Data from a File
796(1)
25.5.6.1 CConstantBlock::ReadBlockDataFromFile()
796(2)
25.5.6.2 CDerivativeBlock::ReadBlockDataFromFile()
798(1)
25.5.6.3 CDivideBlock::ReadBlockDataFromFile()
799(1)
25.5.6.4 CGainBlock::ReadBlockDataFromFile()
799(1)
25.5.6.5 CIntegratorBlock::ReadBlockDataFromFile()
800(2)
25.5.6.6 CLinearFnBlock::ReadBlockDataFromFile()
802(1)
25.5.6.7 COutputBlock::ReadBlockDataFromFile()
802(1)
25.5.6.8 CSignalGeneratorBlock::ReadBlockDataFromFile()
803(1)
25.5.6.9 CSubsystemBlock::ReadBlockDataFromFile()
804(1)
25.5.6.10 CSubsystemInBlock::ReadBlockDataFromFile()
805(1)
25.5.6.11 CSubsystemOutBlock::ReadBlockDataFromFile()
805(1)
25.5.6.12 CSumBlock::ReadBlockDataFromFile()
806(1)
25.5.6.13 CTransferFnBlock::ReadBlockDataFromFile()
806(1)
25.6 Saving the Initial Output Signal for the Divide Block
807(12)
25.6.1 Add Member Variables to the CDivideBlock Class
808(1)
25.6.2 Amend the CDivideBlock Constructor and Destructor Functions
808(1)
25.6.3 Add the Overriding AssignBlockOutputSignal() Function to the CDivideBlock Class
809(4)
25.6.4 Amend the CDivideBlock Class Serialization Functions
813(1)
25.6.5 Amend the PreliminarySignalPropagation() Function
814(5)
25.7 Adding Data-Writing Functionality to the Output Block
819(5)
25.7.1 Add a Save Data Button to the Output Block Dialog Resource
819(1)
25.7.2 Add an Event-Handler Function for the Save Data Button
819(5)
25.8 Summary
824(5)
References
825(4)
PART III Refinement
Chapter 26 Review of Menu and Toolbar-Based Functionality: Part II
829(2)
26.1 Introduction
829(1)
26.2 Functionality to Be Added
829(1)
26.3 Summary
830(1)
Chapter 27 Printing and Print Preview
831(14)
27.1 Introduction
831(1)
27.2 Additions to the DiagramEng Project
832(1)
27.3 Mapping Modes
833(3)
27.3.1 Coordinate Axes
834(1)
27.3.2 Scale of Transformation
835(1)
27.4 Augmenting the CDiagramEngView OnBeginPrinting() Function
836(4)
27.5 Augmenting the CDiagramEngView OnPrepareDC() Function
840(2)
27.6 Augmenting the CDiagramEngView OnDraw() Function
842(2)
27.7 Summary
844(1)
References
844(1)
Chapter 28 Implementing a Scroll View
845(40)
28.1 Introduction
845(1)
28.2 Coordinate Systems
845(2)
28.3 Conversion from CView to CScrollView
847(5)
28.3.1 Changes to "DiagramEngView.h"
847(1)
28.3.2 Changes to "DiagramEngView.cpp"
847(4)
28.3.3 Changes to CDiagramEngView::OnInitialUpdate()
851(1)
28.4 Device Point to Logical Point Coordinate Conversions
852(12)
28.4.1 Amending the CDiagramEngView-Based Functions
852(1)
28.4.1.1 CDiagramEngView::OnContextMenu()
852(1)
28.4.1.2 CDiagramEngView::OnLButtonDblClk()
853(1)
28.4.1.3 CDiagramEngView::OnLButtonDown()
854(1)
28.4.1.4 CDiagramEngView::OnLButtonUp()
855(1)
28.4.1.5 CDiagramEngView::OnMouseMove()
856(1)
28.4.2 Amending the CDiagramEngDoc-Based Functions
857(1)
28.4.2.1 CDiagramEngDoc::TrackBlock()
857(2)
28.4.2.2 CDiagramEngDoc::TrackConnectionBendPoint()
859(1)
28.4.2.3 CDiagramEngDoc::TrackConnectionEndPoint()
860(4)
28.5 Tracking of Multiple Items
864(6)
28.6 Limiting Diagram Entity Placement
870(4)
28.7 Fitting the Logical View to the Physical View
874(3)
28.8 Zooming In and Out of the View
877(7)
28.8.1 Addition of Detail to the CDiagramEngView Zooming Functions
877(2)
28.8.2 Addition of a ScaleSystemModel() Function to the CSystemModel Class
879(1)
28.8.3 Resetting the Default Model Geometry
880(4)
28.9 Summary
884(1)
References
884(1)
Chapter 29 Edit Menu
885(58)
29.1 Introduction
885(1)
29.2 Selection of All Content
885(8)
29.2.1 Add a Select-All-Related Member Variable to the CDiagramEngDoc Class
885(1)
29.2.2 Complete the CDiagramEngDoc::OnEditSelectAll() Function
886(2)
29.2.3 Add a Function to the CSystemModel Class to Get the Diagram Coordinate Minima
888(2)
29.2.4 Add a Resetting Mechanism to Cancel the Select-All Operation
890(3)
29.3 Cut, Copy, and Paste
893(29)
29.3.1 Add CDiagramEngDoc-Based Event-Handler Functions
894(5)
29.3.2 Add the CClipboard Class Declaration and Definition
899(2)
29.3.3 Add Class Copy Constructors and Related Methods
901(1)
29.3.3.1 CBlock Copy Constructor
901(2)
29.3.3.2 CBlockShape Copy Constructor
903(1)
29.3.3.3 CPort Copy Constructor
903(1)
29.3.3.4 CConnection Copy Constructor
904(1)
29.3.3.5 CConstantBlock Copy Constructor
904(3)
29.3.3.6 CDerivativeBlock Copy Constructor
907(1)
29.3.3.7 CDivideBlock Copy Constructor
908(1)
29.3.3.8 CGainBlock Copy Constructor
909(2)
29.3.3.9 CIntegratorBIock Copy Constructor
911(1)
29.3.3.10 CLinearFnBlock Copy Constructor
912(1)
29.3.3.11 COutputBlock Copy Constructor
913(2)
29.3.3.12 CSignalGeneratorBlock Copy Constructor
915(1)
29.3.3.13 CSubsystemBlock Copy Constructor
916(1)
29.3.3.14 CSubsystemInBlock Copy Constructor
917(1)
29.3.3.15 CSubsystemOutBlock Copy Constructor
918(1)
29.3.3.16 CSumBlock Copy Constructor
919(1)
29.3.3.17 CTransferFnBlock Copy Constructor
920(2)
29.3.4 Testing the Cut, Copy, and Paste Operations for a Complete Model
922(1)
29.4 Undoing and Redoing Editing Actions
922(19)
29.4.1 Add the Undo and Redo Event-Handler Functions to the CDiagramEngDoc Class
924(5)
29.4.2 Add Functionality to Save System Models to a List to the CDiagramEngDoc Class
929(2)
29.4.3 Add a Copy Constructor to the CSystemModel Class
931(4)
29.4.4 Add an Assignment Operator to the CSystemModel Class
935(2)
29.4.5 Add Functionality to Update the User Interface to the CDiagramEngView Class
937(2)
29.4.6 Testing the Editing Actions
939(2)
29.5 Summary
941(2)
References
941(2)
Chapter 30 Annotations
943(62)
30.1 Introduction
943(1)
30.2 Add a CAnnotation Class to the Project
943(3)
30.3 Add an Annotation Dialog Window to the Project
946(14)
30.3.1 Add the Format Annotation Entry to the Context Menu
946(4)
30.3.2 Add the New Dialog Window and Associated Functionality
950(1)
30.3.2.1 Insert a New Dialog Window and Add All Necessary Controls
950(2)
30.3.2.2 Attach a Class to the Dialog Window
952(1)
30.3.2.3 Attach Variables to the Dialog Window Controls
952(1)
30.3.2.4 Attach Functionality to Display a Font List
953(5)
30.3.2.5 Add Functionality to the Dialog Window Buttons
958(2)
30.4 Add an Annotation to a System Model
960(3)
30.5 Deleting Annotations
963(3)
30.6 Moving Annotations
966(10)
30.6.1 Fine Movement of an Annotation
966(4)
30.6.2 Direct Movement of an Annotation
970(4)
30.6.3 Multiple Annotation Movement
974(2)
30.7 View Menu-Based Actions
976(4)
30.7.1 Augmenting Auto Fit Diagram
976(3)
30.7.2 Zooming In and Out of a Diagram
979(1)
30.7.3 Resetting Initial Diagram Geometry
980(1)
30.8 Format Menu-Based Actions
980(4)
30.8.1 Augment Document-Based Classes
980(3)
30.8.2 Updating the User Interface
983(1)
30.9 Edit Menu-Based Actions
984(10)
30.9.1 Cut, Copy, and Paste Actions Involving Annotations
985(1)
30.9.1.1 Add a Copy Constructor and Relevant Methods to the CAnnotation Class
985(1)
30.9.1.2 Add CAnnotation Specific Variables and Methods to the CClipboard Class
986(1)
30.9.1.3 Augment the OnEditCut(), OnEditCopy(), and OnEditPaste() Functions
987(4)
30.9.2 Undo and Redo of Editing Actions Involving Annotations
991(1)
30.9.2.1 Augment the Model Saving Function
991(1)
30.9.2.2 Augment the CSystemModel Copy Constructor
992(1)
30.9.2.3 Augment the CSystemModel Assignment Operator
993(1)
30.10 Serialization of the CAnnotation Class
994(9)
30.10.1 CAnnotation Class Serialization
995(1)
30.10.1.1 CAnnotation::WriteAnnotationDataToFile()
995(1)
30.10.1.2 CAnnotation::ReadAnnotationDataFromFile()
996(2)
30.10.2 CSystemModel Class Serialization
998(3)
30.10.3 Augmenting the File Open Methods
1001(2)
30.11 Summary
1003(2)
References
1004(1)
Chapter 31 Tools Menu
1005(12)
31.1 Introduction
1005(1)
31.2 Tools Menu Implementation: Diagnostic Information
1005(9)
31.2.1 Presentation Space Application Programming Interface
1005(1)
31.2.2 Structures, Functions, and Fields Required for Memory-Related Information
1006(1)
31.2.3 Add a Dialog Window to Display Diagnostic Memory-Related Information
1007(1)
31.2.3.1 Insert a New Dialog Window and Add All Necessary Controls
1007(1)
31.2.3.2 Attach a Class to the Dialog Window
1007(1)
31.2.3.3 Attach Variables to the Dialog Window Controls
1007(1)
31.2.3.4 Add Functionality to the Dialog Window Buttons
1007(4)
31.2.3.5 Add Functionality to Initialize Variables
1011(1)
31.2.3.6 Create the Dialog Window
1011(3)
31.3 Summary
1014(3)
References
1015(2)
Chapter 32 Help Menu
1017(8)
32.1 Introduction
1017(1)
32.2 Using DiagramEng
1017(1)
32.3 Creating the Using DiagramEng Document
1017(5)
32.3.1 CreateProcess() Function
1018(1)
32.3.2 OnHelpUsingDiagramEng() Function
1018(4)
32.4 Summary
1022(3)
References
1023(2)
Chapter 33 Finalizing the Project
1025(8)
33.1 Introduction
1025(1)
33.2 Preventing Usage of Nonfunctional Blocks
1025(2)
33.3 Preventing the Building of Subsystems
1027(1)
33.4 Disabling Nonfunctional Items
1027(1)
33.5 Preparing the Source and Executable Files
1028(3)
33.5.1 Memory Leak Detection
1028(1)
33.5.2 Release Version of the Software
1029(1)
33.5.3 Source Code
1030(1)
33.6 Summary
1031(2)
References
1031(2)
Chapter 34 Conclusion
1033(10)
34.1 Introduction
1033(1)
34.2 Project Review
1033(3)
34.2.1 User Interaction
1033(1)
34.2.2 Model Computation and Data
1034(1)
34.2.3 Refinement
1035(1)
34.3 Improvements
1036(5)
34.3.1 Object-Oriented Analysis and Design
1036(1)
34.3.1.1 Class Hierarchy
1036(1)
34.3.1.2 Retrieving the Address of the Document
1037(1)
34.3.2 Addition of Classes
1037(1)
34.3.3 Unnecessary Features
1037(1)
34.3.4 Naming Convention
1038(1)
34.3.5 Member Variables and Constant Accessor Methods
1038(1)
34.3.6 Program State
1039(1)
34.3.7 Generic Containers
1039(1)
34.3.8 Base Class Selection
1039(1)
34.3.9 Serialization
1040(1)
34.3.10 Activity Organization
1040(1)
34.4 Summary
1041(2)
References
1042(1)
Appendix A ControlEng: Win32 Console Application 1043(20)
Appendix B Constructing Connections: An Exploration 1063(14)
Appendix C NodeArcConnectivity: Win32 Console Application 1077(16)
Appendix D Debugging: An Introduction 1093(22)
Appendix E MatrixInversion: Win32 Console Application 1115(18)
Appendix F Using DiagramEng 1133(18)
Index 1151
Bud Fox, Zhang Wenzu, Tan May Ling