Alain Renaud          

Retour à l'accueil / go back to home page

 

 

  CpX 

 
 

 


the SourceForge Cpx site (JavaScript)
Home
Projects

                                         


Welcome

July 31, 2008 - CpX 0.5.2 available

CpX 0.5.2 is now available for download. CpX 0.5.2 fixes a large number of bugs and adds a number of features which were asked for by users regarding bugs.

What is CpX?

CpX is an XML-based lightweight C++ development environment.

Why CpX?

Why another build tool when there is already make, gnumake, nmake, jam, and others? Because all of those tools have limitations that its original author couldn't live with when developing software across multiple platforms. Make-like tools are inherently shell based. They evaluate a set of dependencies and then execute commands not unlike what you would issue on a shell. This means that you can easily extend these tools by using or writing any program for the OS that you are working on. However, this also means that you limit yourself to the OS, or at least the OS type such as Unix, that you are working on.  

Makefiles are inherently evil as well. Anybody who has worked on them for any time has run into the dreaded tab problem. "Is my command not executing because I have a space in front of my tab!!!" said the original author of Ant way too many times. Tools like Jam took care of this to a great degree, but still use yet another format to use and remember. CpX is different. Instead a model where it is extended with shell based commands, it is extended using Java classes. Instead of writing shell commands, the configuration files are XML based calling out a target tree where various tasks get executed. Each task is run by an object which implements a particular Task interface. Granted, this removes some of the expressive power that is inherent by being able to construct a shell command such as `find . -name foo -exec rm {}` but it gives you the ability to be cross platform. To work anywhere and everywhere. And hey, if you really need to execute a shell command, CpX has an exec rule that allows different commands to be executed based on the OS that it is executing on. Thank you to the Java team for their inspiration...

How?

XML support in browsers varies widely:

- you can check CpX files well-formedness through IE, Firefox and Opera directly. 

- you can apply XSL stylesheets that renders HTML in IE, Firefox and Opera. 

- you can apply XSL stylesheets that renders text in Firefox and Opera

  (but not IE because its processor eats away spaces). 

- you can't validate an XML file against its Schema definition in either browser... 

 

- to declare a pure virtual function, you don't use the C++ syntax but rather use an "abstract" qualifier;

- the "interface" markup element has the same meaning as its Java equivalent 

  (i.e. a class with only pure virtual functions and constant data members);

 

- C++ things you definitely can't do with CpX:

+ use of the constructs: void,goto,continue,break,switch/case/default,do/while,struct,enum,union,typedef

+ loose code outside classes + more than one class declaration per file 

+ nested sub-classing + multiple inheritance of concrete classes

+ pre-processor instructions (except include) + template definition; 

 

- C++ things you should not do with CpX but can with its override elements (value_cpp, expression_cpp, method_path_cpp, method_signature_cpp): 

+ primitive types and arrays + memory notation (* & -> sizeof malloc delete) 

+ compound declarations, initializations and assignments

+ "operator" assignments (*= /= %= += –= <<= >>= &= ^= |= )

+ template calls; 

 

- C++ things you should not do with CpX but can with its normal syntax: 

+ operator overloading 

+ conversion function 

+ inlining 

+ C++-style casting 

+ default function arguments;

CpX components

- a philosophy of simplified object-oriented software engineering with a C++ subset:  

+ no legacy C keywords (like goto or switch) 

+ no primitive types (only objects) 

+ no loose code (only classes)

+ safe string handling

+ no pointer notation 

+ automatic handling of reference variables 

+ automatic garbage collection 

+ automatic conversion between primitive objects in expressions 

+ automatic conversion between literal base objects in return and parameters 

+ automatic protection against null values 

+ no multiple inheritance of concrete classes 

+ no nested sub-classing 

+ no default function arguments 

+ no "operator" assignments (like +=) 

+ no other alternate redondant syntax (typedefs, structs, unions, do-while) 

+ no inlining 

+ no templates 

+ no pre-processor instructions (except include) 

+ platform independance; 

 

- an XML normalized format for *.cpx code files named cpx.xsd (through an XML schema); 

  (also a Microsoft XDR format and a DTD); 

 

- 7 transformers from and to C++ files and HTML (through XSL):

+ automcpx_xml (automatic generation) 

+ optiocpx_xml (optional generation) 

+ cpxtohpp_text (text header generation) 

+ cpxtocpp_text (text source generation) 

+ cpxtohpp_html (html header generation) 

+ cpxtocpp_html (html source generation) 

+ cpptocpx_xml (reverse generation); 

 

- a set of 17 base classes in a library named CpX:  

+ Objex (root) 

+ Clonx (cloneable interface) 

+ Logix (boolean logic) ?????????????????????? 

+ Intex (integer) 

+ Realx (real) 

+ Charx (string) 

+ Datex (date««) 

+ Excpx (exception) 

+ Listx (array) 

+ Loggx (logging) 

+ Confx (configuration) 

+ I18nx (localization) 

+ Testx (testing) 

+ Reflx (reflection) 

+ Exmlx (XML) 

+ Comix (I/O) 

+ Helpx (Help system) 

+ Regex (regular expressions) ??????????? 

+ Netix (Internet) 

+ Thrdx (threading); 

 

- the optional generation of general-purpose useful C++ services:  

+ logging (through Log4Cxx) 

+ configuration (through Config) 

+ localization (through ICU) 

+ testing (through CppUnit) 

+ full reflection (through Reflect); 

 

- a browser-based source file editor named CpXedit.fo (through XForms);  

 

- a sequence of tasks to accelerate the building process (through Ant or NAnt???):  

+ XML well-formedness 

+ XML validation (also through cpx_validate.html) 

+ XSL transformation to C++ 

+ pretty-printing 

+ documentation generation 

+ code coverage

+ compiling

+ linking 

+ obfuscation 

+ packaging 

+ testing 

+ running 

+ source control; 

 

- a standard deployment format named CAR (based on JAR);  

 

- a bag of free third-party libraries to assist you in development:  

+ Regexp, I/O and threading (through Boost) 

+ networking (through HTTPClient) 

+ XML (through Xerces) 

+ GUI (through Fox) 

+ 2D (through ImageMagick) 

+ 3D (through OpenGL) 

+ gaming (through Ogre) 

+ GIS (through OGDI and GeoIP) 

+ Java interfacing (through SWIG) 

+ templates (through STL) 

+ MS Windows Run-Time Library (through stdlib); 

 

- a list of free third-party tools to help in your projects:  

+ project management (through ????????????????????????????????????????????????) 

+ design (through VPforUML) 

+ IDE (through EclipseC or CodeBlocks ????????????????????????????????????????) 

+ XML, schema and XSL editing (through Editix or 602XMLFiller) 

+ pretty-printing (through GreatCoverage on MS Windows????????????????????????) 

+ documentation (through Doxygen and GraphViz on MS Windows???????????????????)

+ compiling, debugging and profiling (through OpenWatcom or MinGW?????????????) 

+ obfuscation (through Dotfuscator on MS Windows??????????????????????????????) 

+ code coverage (through CodeCoverage?????????????????????? and Splint) 

+ continuous integration (through CruiseControl) 

+ command interface (through Bash/CygWin) 

+ file comparison (through BeyondCompare) + database system (through MySQL) 

+ downloading (through WSFTP on MS Windows????????????????????????????????????) 

+ installation (through InstallShieldFree on MS Windows???????????????????????) 

+ repositories (through CVS) 

+ browsing (through Firefox or Opera) 

+ Web collaboration (through TikiWiKi with Apache); 

 

- a bunch of relevant reference documentation around C++;  

 

- and when you are tired, a game of Sudoku written with CpX...

The Latest Version

Latest details can be found on the SourceForge CpX Project web site at <http://www.sourceforge.net/projects/cpxdev>

Documentation

Documentation is available in HTML format, in the doc/ directory. For information about building and installing CpX, see doc/install.html You can view the documentation for the current release online

Nightly Builds

If you wish to use the latest CpX features, you can try downloading a nightly build from here

Get Involved

Licensing

This software is licensed under the terms you may find in the file named "LICENSE" in this directory.

Thanks for using CpX: The SourceForge CpX Project

Copyright © Alain Renaud