C + + Open Source Library

Source: Internet
Author: User
Tags xml parser dedicated server wxwidgets

C + + has been a number one development language for "commercial applications", but the laurel has been snatched from Java for years. Because of today's business application types, it has been quickly transferred from desktop applications to Web applications. When Java rampant world, MS and suddenly exert force, out of the C # language, there are large tracts of C + + programmers, think C + + to this sink, not expected, this three years, the vitality of C + + has suddenly been greatly enhanced. The main reason is open source software, basic software (such as concurrent native support, such as Android must launch the native SDK), the emergence of a variety of cross-platform applications.

The open source C + + library must have the following characteristics: it must be a mature product, a cross-platform product, a relatively common library.

I. GENERAL Standard class

stl:c++ Standard Template Library, also open source.

boost:c++ quasi-standard library, it is strong, the lake called the "thoroughly tempered".

If-------master, it will traverse the world.

Deelx (Lightweight regular Expression parsing class library, domestic), boost has strong regular expression parsing library, but if you want only one expression parsing, don't want to drag on the huge boost library ... Support the domestics.

ICONV/ICONVPP: (C-Form encoding conversion function library,

Second, XML parsing library

There are many XML-related libraries in C + +, but most of them are actually C libraries, which are not so light to use naturally. One of the DOM-based TinyXML, sax-based, of course, is xerces. The former is small and fast, easy to use, suitable for data exchange. The latter is a full-featured XML parser.

XERCES-C: The most powerful XML parsing library, not just in the open source Library, you even take into account the business. Of course, its variant, by IBM to sell the version, more than hundreds of trillion of east to support the country code conversion, is more powerful, but I think there is a small, open-source iconv in the front is not enough?

For three lightweight XML parsing open source libraries: Slimxml, TinyXml, Rapidxml, compare the following:

Parsing this 33,000-line, 1.5M-size XML, three libraries were spent

· Slimxml:22ms

· Tinyxml:54ms

· rapidxml:4ms!

The conclusion is that Rapidxml is very strong, incredibly faster than the Slimxml 5 times times more.

Thankfully, Slimxml is still 2.5 times times faster than tinyxml without paying much attention to efficiency. Slimxml Walk is a simple small route, source code only 32k, and TinyXML and Rapidxml source is 147k and 141k, there is such efficiency can be satisfied. Because this library is mainly for a few hundred lines of small files, parsing particularly large XML is not within my scope of consideration.

There is also the Irrxml parser for the Irrlicht (Wisp engine).

XSD (the binding tool for XML and C + + data structures).

third, the database

I prefer OTL (for connecting to a database). The rest is useless.

four, multimedia class

SDL (Simple DirectMedia layer/Multimedia Direct access layer for game programming).

The corresponding C Open Source Library has ffmpeg, MPEG4, AAC, AVC, Libmad, MPEG1, FLAC, AC3, AC3, Matroska famous multimedia player TCPMP world-renowned cross-platform, embedded handheld device video player,

Five, network development class

1. C + + Support Library and code generation tool for gSOAP SOAP protocol.

2, ACE network programming research First choice.
ACE is suitable for research, large-scale network programming inefficient, large online games are almost no use of Ace, a lot of ace projects have been proved inefficient.

In addition to Aces, there are many libraries of systems and network programming. For example, on-line libraries, there are zthread, boost::thread, if zoomed into the C + + field, there is APR, and CII. In terms of file and directory operations, boost also has corresponding components, and in network programming there are socket++, and Boost::asio, in the future c++0x almost certainly have a network programming and a line libraries. At the moment, however, Ace is still the first choice for systems and high-performance network programming, and its status will not be shaken for some time. It is not only a practical library, a framework set, but also a model of the application of design patterns, it is worth learning.

3, open source C + + library, called Poco (Portable components– portable components), very easy to use.

Characteristics:

* Thread, program synchronization and multithreaded programming advanced abstraction
* Stream and File system access
* Shared library loads the class
* Powerful log and Error reporting
* Security and encryption
* Network Programming (TCP/IP sockets, HTTP client and HTTP server, FTP, SMTP, POP3, etc.)
* XML parsing (SAX2 and DOM) and generation
* Configuration file and option processing
* SQL database access (ODBC, MySQL, SQLite)

The platforms that you can run include:

* Windows
* Mac OS X
* IPhone OS
* (embedded) Linux
* HP-UX
* Tru64
* Solaris
* QNX

VI. GUI Library

The third-party library of the interface design under the BCG Windows platform can make your interface a better and more time-sensitive.

WxWidgets: Using WxWidgets, developers can develop applications for WIN32, Mac OS X, GTK +, X11, Motif, wince and other platforms based on the same set of code. The wxwidgets library can be used by C + +, Python, Perl, and c#/. NET and other development languages. Unlike others, which also support cross-platform GUI development tools, wxwidgets-based applications have real-world localization of visual and usage effects-because wxwidgets uses the native controls of the platform rather than simply simulating them by mapping. Wxwidgets is widely used, free, open source, mature.

QT-------------Interface (GUI) development, support c++/java/python/... Multiple languages. Cross-platform. The main advantage is that the API is very beautiful! QT itself is not just doing GUI programming, actually it can basically do anything os-api can do. Like network/Database/opengl/... Provide the perfect support.

Qt is traditionally considered a portable GUI library, but in fact Qt is now a relatively complete portable application framework that contains a number of tools such as regular expressions, web and socket classes, 2D and 3D graphics, XML parsing, SQL classes, etc. It even includes a complete container class library, but its trump card is still a GUI. In the current cross-platform GUI framework, QT is the most mature and has been used by some large companies in key products. Because of the dual license model used by Trolltech for QT, the product can be supported from the open source community and earn enough commercial profits, so the outlook is also more confident.

The main technical feature of QT is its meta-object model. QT does not actually use standard C + +, but rather an extension of standard C + +. It extends through the meta-object model, realizes the famous signal/slot mechanism, and this mechanism also becomes QT's biggest characteristic and the superiority.

A portable GUI framework similar to QT with Wxwidget, FOX, etc.

Six. Computer Vision

OpenCV, an open Source library owned by Delphi. Support C/c++/python interface. This interested friend can play a bit. If you combine OpenCV, you can do something that the layman thinks is a cool program. For example, using its face recognition function, to handle your camera, judge the movement of people, and so on.

seven. Graphic image processing

GDAL, handle large images. If the GIS professional will certainly speak the language to very large TIF images, moving a few GB of aerial imagery. Gdal is great for reading and writing support for large images (like multi-band images can be done). Support C++/java/python ...

The foreign open source GIS software Qgis is using the Gdal

C Graphics Image Library More, Libjpeg, libpng, Zlib, TIFF, JBIG, the most famous open-source image processing software cximage

Viii. Memory Management : Boost::smart_ptr,hans-boehm GC
The memory management of C + + is an eternal topic. In general, C + + developers tend to manage their own memory.     However, to the surprise of many C + + developers, some recent C + + leaders have publicly declared that it is very difficult to write a large, secure program in C + + without an automatic memory management mechanism. Bjarne Stroustrup also suggested to Chinese developers that, for no particular reason, automatic memory management tools should be used in large projects. Therefore, today's C + + developers should actively learn and apply automated memory management facilities.

When it comes to automatic memory management, the lightweight approach is boost::smart_ptr, and the radical approach is to introduce a complete GC mechanism. The Hans-boehm GC is arguably the most trusted in the current open source and more reliable GC. As a Conservative Gc,hans-boehm GC is excellent in terms of performance and functionality. In particular, using this GC, you can still delete, free to manage the memory itself, the impact on our programming habits is relatively small.

Nine, password and security : OpenSSL
Security is a problem that can not be avoided and must be paid attention to in the C + + programming today. However, writing secure applications, especially those that are related to the web, is a very difficult task. In particular, a large number of security, cryptography-related algorithms, specifications, if the developer to explore their own, its workload and difficulty to achieve the unrealistic degree. Therefore, it is necessary to use a reliable library of relevant libraries to improve the security of the program. With the help of third-party security platform, encryption protection of the program. In the security library, OpenSSL is the best choice now, its content is comprehensive and reliable, has become the industry benchmark. In the application encryption protection this piece, Love encryption is very professional. However, due to the inherent complexity of security programming, even with PENSSL, development work is still cumbersome. As a result, we also want to see a simpler and easier-to-use security library for the C + + program.

10. Matrix Calculation : MTL
Since 1995, C + + has made great breakthroughs in the field of scientific computing. This is mainly due to the advanced application of template technology, which makes C + + in the performance of scientific computing has made great progress, a large number of excellent C + + scientific Computing library emerges. such as blitz++, Pooma, MTL, Boost::ublas. In this regard, MTL is a more prominent one in terms of functional richness, performance, development support and maturity, so it can be a priority. It is worth mentioning that in 2002, MTL and later was acquired by Intel Kai C + +, once in the performance evaluation of the defeated Fortran.

11. Middleware

1. Distributed Object Middleware: ICE
Ice is a rising star in the field of distributed object middleware and can be broadly viewed as a "modified version" of CORBA. It is currently used in a number of large projects, including the next Generation Army warfare system, which is hosted by Boeing.
One of the special values of ice is the paradigm implications of its code. Because of the late appearance of ice, developers have systematically applied new C + + programming styles, thus becoming a good target for reading C + + code.

2, Message middleware: ZeroMQ, summary of several characteristics are as follows:

1) in the message system, it is almost the most concise, just a concise API, there are n multiple language bindings, no dedicated server;
2) performance is very superior, far higher than RABBITMQ, ActiveMQ, MSMQ and so on;
3) suitable for distributed and concurrent applications.

12. Regular expression : Boost::regex
Regular expressions are one of the most powerful tools in programming. Regular expression support for C + + has been a soft rib for a long time. About 2001 years or so, there was a regex library in boost, which solved the problem initially. However, the initial regex had some problems in terms of efficiency and reliability, and later, after a large-scale renovation, it reached a relatively perfect level.
Other alternative alternatives are the C language pcre Library, QT Qregexp class, etc.

13. Configuration Management : Lua
With the software system becoming more and more complex, the requirements for the configurable type of software are more and more high. Traditionally, as long as the system is configured by command-line parameters, more and more ways and mechanisms may now be needed. It is becoming more and more popular, and more and more proven, to embed Lua in a C + + program and use a LUA program as a configuration script. The advantage of this approach is that the Lua language is powerful and flexible enough to accommodate complex configuration requirements. At the same time, Lua is easy to embed in C + + programs, and the compilation execution speed is very fast, it can be said to solve the C + + program configuration management problem is an excellent solution.

14.3D game engine :

1. Irrlicht http://irrlicht.sourceforge.net/

Started in 2003 and was named the best open source game engine the following year. The official support for C + + and. Net, extended language bindings include Java,perl,ruby,python. Cross-platform support, using D3D,OPENGL and your own API.

Advantages: Easy to get started; cross-platform; self-brought XML parser; big community;

Cons: Recent developments have slowed down

2. Panda3D http://www.panda3d.org/

Developed by Disney, Carnegie Mellon Entertainment Technology Center supports. Python is the official recommended language. C + + is also supported.

Advantage: a useful community; a lot of functions; regular development;

Disadvantages: lack of tool support; very poor documentation;

3. OGRE http://www.ogre3d.org/

The best one in the image engine. The items of the 2000 state. It is recommended to use the C + + language. Need to be very familiar with programming. Beginners are not suitable.

Advantages: A large number of functions; excellent documentation; large-scale community; active development

Disadvantage: not suitable for first brother; only the image engine

4. Crystal Space Http://www.crystalspace3d.org/main/Main_Page

Released in 1997, an open-source game engine written in C + +. Recommended use of C + +

Pros: Good community support; a lot of features;

Disadvantages: Difficult to learn;

5, Delta3d http://www.delta3d.org/index.php

Delta3d is a full-featured game and simulation engine developed by the United States Naval Research Institute (Naval postgraduate School), with huge support and investment from the U.S. military. The engine has a wide range of applications, such as the development of software for modeling and simulation in the areas of training, education, entertainment, and scientific computing visualization.

Its standardized design puts some well-known open-source software and engines such as Open Scene Graph (OSG), Opendynamicsengine (ODE), Character Animation Library (Cal3d), and Ope NAL is integrated. Delta3d by hiding these underlying modules together to form a more convenient library of advanced API functions, developers can use the underlying functions for two development when necessary. Delta3d in the software family, in the middle layer (middle layers) position.

Advantages: Suitable for all kinds of 3D games, simulation, very comprehensive. been doing the update.

Cons: Less resources. Chinese documents are also relatively small. The official references are relatively small. But reading the source code can speed up understanding, application.

C + + Open Source Library

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.