QLIB::ACE

Useful tools and patterns for ace programming

Introduction

In order to reduce my workload in programming with ACE, I have wrote some classes to simplify the codes. I decide to make it open source , hopes it could be useful for the guys who are also programming in ACE. So I am working in organized those codes and make it into qlib::ace namespace.

All those codes are released under BSD License, so feel free to use them in your projects:)

Documents

API Document: doxygen documents

Classes Documents:

Auto_Release_Ptr

For ACE Programmers, the "Scoped Pattern" is familiar. This common pattern is widely used in standard library( std::auto_ptr ), ACE Library( Guard for several locks ), and something else.

The pattern supposes such a case: when you require a resource in one scope, which have lots of "return" stuff, that would make you mixing up and forget when should you release this resource.

Auto_Release_Ptr is a auto_ptr like smarter pointer, that will ensure the method "release" will be called before delete the object that pointer point out.

Base_Packet

Base_Packet, a base template for all packet type.

The class divide packet policies into two parts: header and body.

Log_Facade

Facade Pattern, used for simplify the usage of ACE_Log_Msg

Callback

To handle callback function in a OO way, GoF present a pattern called "Command", which encapsulate the status of one callback function, to us. This "Command patterns" is used commonly in asynchronous network programming.

To provide a clear and easy interface, I write the Callback class, which is inherited from Command class. The developer that used this class should subclass it into your own concreted class to customize how the callback works, and register it into Callback_Manager

Callback_Manager

Feedback

Send me email for feedback: eddyxu@gmail.com