Unit 2: Borland C Builder Environment - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Unit 2: Borland C Builder Environment

Description:

Discuss how to manage a project in BCB using the views ... Preferences - Autosave (On) Designer - Module creation option - Auto-create forms (Off) ... – PowerPoint PPT presentation

Number of Views:141
Avg rating:3.0/5.0
Slides: 23
Provided by: conest
Category:

less

Transcript and Presenter's Notes

Title: Unit 2: Borland C Builder Environment


1
Unit 2 Borland CBuilder Environment
  • Explain the concept of "project"
  • Discuss how to manage a project in BCB using the
    views
  • Explain the concept of "class" in terms of
    object-oriented programming
  • Identify the files involved in a BCB project
  • Describe the BCB compilation process

2
Topics
  • Defining Projects
  • Defining Units
  • Working with Classes
  • Looking at Project Files
  • Compiling a Project
  • Customizing the Environment

3
Defining BCB Projects
  • BCB Project
  • Collection of units (modules) that comprises the
    software application
  • Information about the project is stored in
    projectname.bpr

4
Defining Units
  • A BCB unit has a cpp file (.cpp) and a header
    file (.h or .hpp)
  • A unit (module) can become an executable file
    (exe), library (LIB) or DLL
  • After each unit is created, you can add to the
    project

5
Project Manager View
  • View -gt Project Manager
  • Show files needed to build each project

6
Saving a Project
  • Create you own directory first
  • Make sure you save to your new directory
  • Warning Do not make your unit name the same as
    your project name. Sharing names will overwrite
    the cpp files
  • Reference SaveFileNames hand-out

7
Project files to copy between home and school
  • .BPR Project files
  • .CPP C source files
  • .H C header files
  • .RES Resource files (icons, etc)
  • .DFM Form file (describes form)

8
Other project files generated
  • No need to keep a copy of these files
  • . temp or backup files
  • .OBJ Object code
  • .TDS Temporary Link File (large!)
  • .DSK Desktop Files (appearance)
  • .DDP (for Delphi)

9
Utility Cleanup.exe
http//www.conestogac.on.ca/mtanuan/ProgOop/demos
/CleanUp.zip
10
Startup options
  • Tools -gt Env. Options -gt
  • CB Direct -gt Poll Network (Off)
  • Preferences -gt Autosave (On)
  • Designer -gt Module creation option -gt Auto-create
    forms (Off)
  • Tools -gt Editor options
  • Code insight -gt Automatic features (All Off)
  • Display -gt Create Backup file (Off)

11
Customizing the IDE
  • View -gt Toolbars -gt Customize

12
Review Class
  • A description of a group of objects sharing
    common properties and methods
  • A class is defined by
  • Properties
  • Methods

13
Class Notation
  • Properties are implemented as data members
  • Methods are implemented as member functions

14
Abstraction
  • Ability to use an object without needing to
    understand its implementation

Information hiding
Private and Protected members Published (for
Borland Properties)
Public members
15
Class Example
16
Object TreeView
17
Projects, Forms, Units
  • Created automatically when you create an
    Application
  • File -gt New -gt Application
  • WinMain called from the projects source (.cpp)
    file.

18
Working with Classes
  • Information describing a form is stored in
    formname.dfm
  • XML format
  • Information describing events and event handlers
    (to be discussed later) are stored in
    classname.cpp

19
BCB Compile/Link Process
Main.cpp
Unit.cpp
Source files
Compilation
Main.obj
Unit.obj
Main.res
Binary code/ Binary resource files
Linking
Unit.dfm
generates TDS link file!
Main.exe
Executable
20
Summary
  • A project consists of one or more units / forms.
  • A project is an EXE, a LIB, or a DLL.
  • A class is a description of a group of objects
    sharing common properties and methods.
  • With the Project Manager View and Object
    TreeView, you can manage the current project.

21
Summary (2)
  • C files are automatically generated when an
    application is created.
  • The C source files are compiled and linked
    together to produce a executable file or library.
  • Using the Toolbars Customize dialog box, you can
    select which buttons appear in the toolbar.

22
Unit Exercise
  • Using the views to become familiar with the files
    generated by Borland C Builder.
Write a Comment
User Comments (0)
About PowerShow.com