YOU CAN CODE!

 

With The Case Of UCanCode.net  Release The Power OF  Visual C++ !   HomeProducts | PurchaseSupport | Downloads  
Download Evaluation
Pricing & Purchase?
E-XD++Visual C++/ MFC Products
Overview
Features Tour 
Electronic Form Solution
Visualization & HMI Solution
Power system HMI Solution
CAD Drawing and Printing Solution

Bar code labeling Solution
Workflow Solution

Coal industry HMI Solution
Instrumentation Gauge Solution

Report Printing Solution
Graphical modeling Solution
GIS mapping solution

Visio graphics solution
Industrial control SCADA &HMI Solution
BPM business process Solution

Industrial monitoring Solution
Flowchart and diagramming Solution
Organization Diagram Solution

Graphic editor Source Code
UML drawing editor Source Code
Map Diagramming Solution

Architectural Graphic Drawing Solution
Request Evaluation
Purchase
ActiveX COM Products
Overview
Download
Purchase
Technical Support
  General Q & A
Discussion Board
Contact Us

Links

Get Ready to Unleash the Power of UCanCode .NET


UCanCode Software focuses on general application software development. We provide complete solution for developers. No matter you want to develop a simple database workflow application, or an large flow/diagram based system, our product will provide a complete solution for you. Our product had been used by hundreds of top companies around the world!

"100% source code provided! Free you from not daring to use components because of unable to master the key technology of components!"


C++ and VC++ Code Generator Tool, Free UML Class Diagram Drawing Tool

 
 By darkoman. 

A free C++ code generator tool with source code.

Introduction

This article is about a free C++ code generator tool. The code generator does what its name says: it generates source code based on an object model (like a UML class drawing diagram tool ), which represents the logical structure of your classes. It also helps you develop your applications faster and change things inside their structure, using a graphical user interface.

Using the Application

This submission is a tool, so the source code will not be discussed here. Instead, I will discuss how to use the tool.

The code generator has a graphical user interface by which you can build and manipulate simple UML class definitions on the screen. To insert a new class, select the Insert->Class... option from the main menu. The new class object will appear on the screen. You can place it wherever you want by dragging it. Similarly, to insert a new struct, select Insert->Struct... from the main menu and the new struct object will appear on the screen.

To change a class's settings, double click on the class object. The following dialog box will appear:

ClassOptionsDialog - General Page

Here, you can change the names of the class and its header and implementation files. You can also add author information and a short class description.

On the next page you can add member variables and properties to your class:

ClassOptionsDialog - Class Members Page

The settings on this tab page will be easily recognizable by C++ developers, so I will not waste space in this article by explaining them all in detail. The interesting option here is the Declare as property checkbox which, when enabled, will cause a pair of accessor methods (GetPropertyName() and SetPropertyName()) to be added to read/write values directly to the member variable. You have to specify a name for the property before you add it.

The next tab page is for class methods:

ClassOptionsDialog - Class Methods Page

Just as you can add member variables, you can also add class methods by declaring them on this tab page. A default method body will be generated in the class implementation file.

There are also additional class settings that you can change:

ClassOptionsDialog - Other Settings Page

Here you can add inheritance parents to this class (the classes that current class is derived from), include MFC precompiled headers, and turn on/off comment generation. Comments are important since the code can turn into a real mess later, and you will not be able to find what you need if you don't add explanations to what you create.

Working with structs is simpler than working with classes so I will not take the time to explain it.

Using the Results

After you build your class diagram you can select Build->Generate files option from the main menu and VisualClassBuilder will generate the required C++ files in the default output directory for you. From there, you can add them to your Visual Studio (or other) project.

Also, you can print the class diagram you have built by selecting File->Print from the main menu. To save your work, use File->Save. To load a saved project, use File->Open.

Points of Interest

I needed a tool like this one to speed up my work on different projects that use a similar class structure, so that I could avoid having to write the same source code multiple times.

VisualClassBuilder v1.0 features:

  • Class generation
  • Struct generation
  • Class inheritance support
  • MFC precompiled header support
  • Comments generation
  • Project saving/loading
  • Class diagram printing

 

Copyright ?1998-2024 UCanCode.Net Software , all rights reserved.
Other product and company names herein may be the trademarks of their respective owners.

Please direct your questions or comments to webmaster@ucancode.net