C + + Classic class library (c + + development must SEE)

Source: Internet
Author: User
Tags building windows gtk wrapper xml parser xslt processor

In reality, the Library of C + + has a wide variety of problems, and the solution is extremely extensive, from lightweight to heavyweight. This article introduces you to 11 kinds of libraries, which are common to us, and are uncommon to see together.

If you have a certain C-base may be easier to learn, but the process of learning C + + try to avoid the use of some of C's ideas, usually also to see some of the master writing code, encountered a lot of thinking, how to abstract the problem, so that their brains have the concept of class; Finally, do not forget to always on the machine self-tune program, this is no one can replace.

Introduction to C + + class libraries

Once again embodies the C + + to maintain core language efficiency at the same time vigorously develop the application library development trend!! In C + +, the position of the library is very high. Mr. Bjarne Stroustrup, the father of C + +, has repeatedly expressed the view that designing a library to augment functionality is better than designing more grammatical words. In reality, the Library of C + + has a wide variety of problems, and the solution is extremely extensive, from lightweight to heavyweight. A lot of people are eye-opening, or looking at the idea of a masterpiece of thought. Because the number of libraries is very large, and is limited to the author level, many of them do not understand. So some of the libraries mentioned in this article are large libraries that are relatively famous.

First, the standard library

The basic facilities of C + + programs are available in the standard library. Although the C + + standard library with the C + + standard has been tossing for many years, until the standard of formal stereotypes, but in the implementation of the standard library is very gratifying to see a variety of implementations, and has been proven to have industrial-grade strength of the masterpiece.

1. Dinkumware C + + Library

High quality standard library written by P.J Plauger. P.J. Dr. Plauger is Dr. Dobb ' s Program Design Excellence Award winner. Its library has long been adopted by Microsoft, and recently Borland has also made its OEM license, using Dinkumware libraries in its c/c+ + product.

2. Roguewave standard C + + Library

This library was used in earlier versions of Borland C + + Builder and was later replaced by other libraries.

3. SGI STL

SGI's C + + Standard Template Library.

4, STLport

A cross-platform portable version of the SGI STL library.

Second, quasi-standard library--boost

The Boost library is a thoroughly tempered, portable, source-code C + + library that is backed up as a standard library and is one of the engines of the C + + standardization process. The boost library was initiated by members of the C + + Standards Committee Library Working Group and has a significant impact in the C + + community, with nearly 2000 members. The Boost library brings us the latest, coolest and most practical technology, and is a true "quasi" standard library.

There are a few more famous libraries in boost:

1. Regex

Regular Expression Library

2, Spirit

LL parser Framework, expressed directly in C + + code EBNF

3. Graph

Diagram components and Algorithms

4. Lambda

Define short, anonymous function objects where they are called, useful functional functions

5. Concept Check

Checking for concept in generic programming

6. MPL

Meta-programming framework implemented with templates

7. Thread

Portable C + + multi-line libraries

8. Python

Map C + + classes and functions into Python

9. Pool

Memory Pool Management

10, Smart_ptr

Three, 5 smart pointers

Boost overall is a high-value, high-quality library. And because of its emphasis on cross-platform, the emphasis on standard C + + is to write platform-Independent, modern C + + developers must have tools. But there are a lot of things that are experimental in boost, and they need to be cautious in practical development. And many of the library functions in boost is an extension of the language function, the structure of the use of sophisticated techniques, do not rush to spend time to study. The other side of boost, such as graph, is an industrial-strength, well-structured, high-quality code that is worth reading, and can be used with confidence in the product code.

Iv. GUI

In many C + + libraries, the GUI part of the library is relatively prosperous, but also more compelling. In the actual development, the choice of GUI library is also very important thing, below we summarize the optional GUI library, the respective characteristics and the support of related tools.

1. MFC

The Microsoft Foundation Class Library The people who have studied VC + + should know this library. Although technically speaking, MFC is not very beautiful, but it is built on the Windows API, can make the work of the programmer easier, more efficient programming, reduce a lot of the code that must be written when building Windows programs, but also provides all the advantages of general C + + programming, such as inheritance and encapsulation.

Programs written by MFC are portable on every version of the Windows operating system, for example, code written under Windows 3.1 can be easily ported to Windows NT or Windows 95. But there has been a growing trend in recent developments and official support.

2. QT

Qt is a multi-platform C + + graphical user interface application framework for Trolltech Corporation. It gives application developers the functionality they need to build an art-level graphical user interface. QT is fully object-oriented and easy to scale, and allows for true component programming. Since the early 1996, QT has entered the business world, and it has become the foundation of thousands of successful applications worldwide. Qt is also the foundation of the popular Linux desktop environment KDE, and it also supports many platforms such as Windows, Macintosh, unix/x11 and so on.

3, Wxwindows

A cross-platform GUI library. Because its class hierarchy is very similar to MFC, an article introduces code porting from MFC to wxwindows to achieve cross-platform functionality. Through years of development is also an increasingly sophisticated GUI library, support is also not weaker than the previous two libraries. And it's completely open source code. The GUI designer for the recent C + + Builder X is based on this library.

4. Fox

Open source GUI library. The author from his own experience in the development of an ideal GUI library should be what it feels like to start, thus began the development of this library. If you are interested, you can try it.

5, WTL

A library that is based on ATL. Because of the use of a lot of ATL's lightweight approach, templates and other technologies, in terms of code size, and speed optimization is done in place. The main target audience is the developer of a visual control that develops COM's lightweight web-based downloads.

6. GTK

GTK is a famous open source GUI library for C. In the Linux world, there are killer apps like Gnome. And GTK is the C + + package version of this library.

Five, network communication library

Ace

The representative of C + + library, the ultra-heavyweight network communication development framework. The ACE Adaptive Communication Environment (Adaptive communication environment) is a free-to-use, open-source object-oriented framework that implements many of the core patterns used in concurrent communication software. ACE provides a rich set of reusable C + + wrapper skins (Wrapper facade) and framework components to accomplish common communication software tasks across multiple platforms, including: Event multiplexing and event handler dispatch, signal processing, service initialization, interprocess communication, shared memory management, message routing, Distributed service dynamic (Heavy) configuration, concurrent execution and synchronization, and so on.

Streammodule

Designed to simplify the library of writing distributed programs. Trying to make it easier to write a program that handles asynchronous behavior rather than using a synchronous shell to wrap the nature of asynchrony.

Simplesocket

This class library makes it easier to write socket-based client/server programs.

A Stream Socket API for C + +

Another package library for the socket.

VI. XML

Xerces

Xerces-c++ is a very robust XML parser that provides validation, as well as sax and Dom APIs. XML validation is well-supported in document type definitions (DOC type DEFINITION,DTD), and in December 2001 it added a basic and complete open standard for supporting XML schemas.

Xmlbooster

This library greatly improves the speed of XML parsing by producing a specially crafted parser, and can produce a corresponding GUI program to modify the parser. Another feasible solution is provided in addition to the two main XML parsing methods of Dom and sax.

Pull Parser

This library uses the parser of the Pull method. There is a pull parser at the bottom of every SAX parser, and this xpp exposes this layer directly to everyone's use. It's worth trying to take full account of the speed.

Xalan

Xalan is an XSLT processor used to convert an XML document into HTML, plain text, or other XML-type documents.

CMarkup

This is an XML parser that uses Edom. Very flexible and practical in many ways. It's worth a little inspiration outside of Dom and sax.

libxml++

libxml++ is a C + + encapsulated version of the named Libxml XML parser

VII. Scientific calculations

blitz++

blitz++ is an efficient library of numerical computing functions designed to create a numerical environment that is as convenient as C + + and faster than FORTRAN. Usually, the numerical program written in C + + is about 20% slower than Fortran, so blitz++ is going to get rid of this shortcoming. The method is to use C + + template technology, program execution can even faster than FORTRAN. blitz++ is still in development and is not available for common linear algebra methods such as common svd,ffts,qmres, but users can easily build using the functions provided by blitz++.

Pooma

Pooma is a free, high-performance C + + library for processing parallel scientific computations. Pooma's object-oriented design facilitates rapid program development, optimizes parallel machines for maximum efficiency and facilitates use in industrial and research environments.

Mtl

The Matrix Template Library (MTL) is a high-performance generic component library that provides a large number of linear algebra functions for various format matrices. In some applications where high-performance compilers are used, such as Intel's compilers, the resulting assembly code shows almost no difference in performance from handwriting.

Cgal

The purpose of the computational Geometry algorithms library is to make most of the important solutions and methods in computational geometry available to industrial and academic users in the form of C + + libraries.

Eight, game development

Audio/video 3D C + + programming Library

Av3d is a cross-platform, high-performance C + + library. The main features are 3D graphics, sound support (SB, and s3m), control interface (keyboard, mouse and Remote sensing), XMS.

KlayGE

Domestic game development Masters themselves in C + + development of the game engine. Klayge is an open source, cross-platform game engine that uses Python as the scripting language. Klayge is issued under the LGPL agreement. Thank Mr. Min for his contribution to the development of Chinese games.

Ogre

The OGRE (object-oriented graphics rendering engine) is developed in C + + using a flexible object-oriented 3D engine. It is designed to make it easier and more straightforward for developers to develop applications or games based on 3D hardware devices. The class library in the engine abstracts the full use details of the more underlying system libraries (such as Direct3D and OpenGL) and provides interfaces and other classes based on real-world objects.

Nine, Thread

C + + Threads

The goal of this library is to provide programmers with easy-to-use classes that are inherited to provide a large number of threading features that are difficult to see in a Linux environment.

Zthreads

An advanced object-oriented, cross-platform C + + thread and synchronization library.

Ten, serialization

s11n

An STL-based C + + library for serializing Pod,stl containers and user-defined types.

Simple XML Persistence Library

This is a lightweight C + + library that serializes objects into XML.

Xi. string

C + + Str Library

Libraries that manipulate strings and characters, support windows and multiple platforms that support GCC. Provides highly optimized code and supports multithreaded environments and Unicode, along with support for regular expressions.

Common Text Transformation Library

This is a library that parses and modifies STL strings. The CTTL substring class can be used to compare, insert, replace, and parse with EBNF syntax.

GRETA

This is a library of processing regular expressions developed by researchers at Microsoft Research. Very good performance in small match situations.

12. Comprehensive

P::classes

A highly portable C + + application framework. Currently concerned with the type and thread safety of the signal/slot mechanism, the I/O system includes a plug-in-based network protocol transparent I/O architecture, a plugin-based application message log framework, access to SQL database classes, and so on.

Acdk-artefaktur Component Development Kit

This is a platform-independent C + + component framework, similar to frameworks in Java or. NET (reflection Mechanics, threading, Unicode, scrap collection, I/O, networking, utilities, XML, and so on), as well as Java, Perl, Python, TCL, Lisp, COM and The integration of CORBA.

Dlib C + + library

A synthesis of a variety of classes. Large integers, sockets, threads, GUIs, container classes, and directory-browsing APIs, and so on.

Chilkat C + + Libraries

This is the library that provides zip,e-mail, coding, s/mime,xml and so on.

C + + Portable Types Library (PTypes)

This is a relatively simple alternative to STL, as well as portable multi-threaded and network libraries.

Loki

Oh, you might complain that I should have introduced it with boost, an experimental library. The author of the C + + template in Loki to the extreme. And try to provide things like design patterns that are thought-level through libraries. It also provides a more practical function such as smart pointers.

Atl

The ATL (Active Template Library) is a small, efficient, flexible set of classes that provide the basic facilities for creating interoperable COM components.

Fc++: The functional C + + Library

This library provides some of the features that are available in functional languages. belongs to the use of libraries to expand the language of a masterpiece. If you want to find another point of fun outside of OOP, take a look at the world of functional programming. Master Peter Norvig in the article "Teach yourself Programming in Ten years", the functional language is listed as one of the 6 programming languages that should be learned at least.

FACT

Another library to implement functional language features

crypto++

provides free library for handling password, message verification, one-way hash, public key encryption system and other functions.
There are many very exciting or extremely useful C + + libraries that are limited to our level and the length of the article cannot be included. In the introduction of these have been included in the recent library, because not every one we have used, so there is inevitably biased, please forgive the reader.

Just as we can learn the development of computer history by important people in computer history, C + + related People's website can also make us get the most valuable reference and learn from, the following characters we think not to introduce the necessary, only because the following characters in the C + + field status is well known, We will only list the relevant resources for the reader to learn, some of them work at Bell Labs, some work in well-known compiler manufacturers, some are constantly promoting the standardization of language, and some for the reader to write a number of thousand Gucci.

C + + Classic class library (c + + development must SEE)

Related Article

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.