Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.184.014 Times

libxcpc 0.21

  Date Added: November 13, 2010  |  Visits: 904

libxcpc

Report Broken Link
Printer Friendly Version


Product Homepage
Download (94 downloads)



libxcpc library implements an automatic resource cleanup and exception handling in C. Error handling and cleanup code (at least for code that does error handling) can take quite some space in terms of lines of code to be written. This not only increases the binary size, but makes the code more difficult to read. C++ has native exception handling, and this solves part of the problem, while keeping exposed the resource cleanup one. The libxcpc offers C++ like exception handling, plus automatic resource cleanup, to be used in software written in C. The libxcpc introduces three abstractions, that are Resource, Container and Exception. The Resource is every object (or action) that needs cleanup. This can be a block of allocated memory, an open file, a mapped memory region, etc... Every allocated Resource is owned by a Container. A Resource can be moved from a Container to another. A Container is a bucket inside which Resource are allocated. A Container can be the parent of other Containers, by hence introducing a parent/child relationship between Containers. A Container can be reassigned to be child of a new Container. By freeing a Container all the Resources allocated inside the Container will be freed, and all the child Containers will be recursively freed too. Resource Containers greatly simplify the resource cleanup code, by being able to issue a single call to free a Container and having automatically all the Resources contained by it, freed as well. Resources are added/removed in a LIFO (Last In First Out) way, and the libxcpc library offers APIs to re-arrange the order of the Resources inside their Contexts. An Exception is (like in C++) any kind of abnormal condition that prevent the program to flow in its path. This can be a failed memory allocation, a failure to open a file, a failure to mmap(2) a portion of a file, a failure to write(2) a file, etc... An Exception is described by a unique number (int) and by an associated data (void *). Exceptions are thrown using the XCPC_THROW(ctx, exno, data) statement, or re-thrown using XCPC_RETHROW(ctx). A nice feature of exception handling, is that it allows you to handle only certain kind of exceptions, and different exceptions in different points of your code tree. Using libxcpc library, you handle exceptions by surrounding the potentially-throwing code with the XCPC_TRY(ctx) statement. The code can then use either the XCPC_CATCH(exno) or the XCPC_CATCH_ANY statements to handle specific or all kind of exceptions that happened in the code bound by the XCPC_TRY(ctx). An Exception block must be terminated by a XCPC_END_TRY statement. If the current Exception block does not handle the current Exception using the XCPC_CATCH(exno) statement, and does not have a XCPC_CATCH_ANY statement, the libxcpc library backtrack to find a valid handler in the code at higher layers of the call hierarchy. It is important that at least the other Exception block uses a XCPC_CATCH_ANY statement, so that any Exceptions not caught by the code, is handled properly. When an Exception is caught by an handler, all the resources allocated by the code from the beginning of the XCPC_TRY(ctx) block, down to the place where the Exception is thrown, are automatically freed once the handler reaches the XCPC_END_TRY statement. Whats New in This Release: - This release adds new system calls wrappers and fixes a few minor bugs..

Requirements: No special requirements
Platforms: Linux
Keyword: Catch Cleanup Code Container Exception Exception Handling Handling Libraries Libxcpc Programming Resource Try Xcpc
Users rating: 0/10

License: Freeware Size: 389.12 KB
USER REVIEWS
More Reviews or Write Review


LIBXCPC RELATED
Miscellaneous  -  Functional exception handling 1.0
This scrip represents a tool for turning exception handling into functional alternation. try..except clauses make Python source code often clumsy and impact the readablity. This script presents a simple functional approach to work with exceptions...
 
Libraries  -  Exception::Class::TryCatch 1.10
Exception::Class::TryCatch is a syntactic try/catch sugar for use with Exception::Class. SYNOPSIS use Exception::Class::TryCatch; # simple usage of catch() eval { Exception::Class::Base->throw(error) }; catch my $err and warn $err->error;...
15.36 KB  
Libraries  -  cexcept 2.0.0
cexcept (pronounced "see except" in English) is a package providing a Try/Catch/Throw exception handling interface for ANSI C (C89 and subsequent ISO standards). It does not attempt to handle "real" exceptions like floating-point exceptions or...
9.22 KB  
Libraries  -  Luka 1.08
Luka is an exception handling and reporting framework. SYNOPSIS use Error qw(:try); use Luka; try { $ftp->login("someuser", "somepass") || throw Luka::Exception::External ( error => $ftp->message . $@, id => "login", context => "FTP...
36.86 KB  
Libraries  -  Bio::Root::Object 1.4
Bio::Root::Object is a core Perl 5 object. SYNOPSIS # Use this module as the root of your inheritance tree. Object Creation require Bio::Root::Object; $dad = new Bio::Root::Object(); $son = new Bio::Root::Object(-name => Junior, -parent...
4.7 MB  
Libraries  -  Exception::Class::TCF 0.03
Exception::Class::TCF is a Java/C++ style exception handling. SYNOPSIS try BLOCK [ [catch] NAME FUN_REF ]* throw [ EXCEPTION LIST ] package EnclosureException; @ISA = qw(Exception::Class::TCF); package main; use Exception::Class::TCF;...
11.26 KB  
Programming  -  Error::TryCatch 0.07
Error::TryCatch is a Perl module that implements exception handling (try-catch) blocks functionality with an interface similiar to Error.pm (in fact, it's almost a drop-in replacement). The main difference is that it's a source filter module.
10.24 KB  
Utilities  -  pyFLTK 0.4
JNI++ is a set of two code generating utilities and a core C++ library that simplify programming to the Java Native Interface (JNI) with C++. The first of these utilities is used to generate C++ "proxy" classes given a Java class or interface, and...
1.38 MB  
Libraries  -  Memory Structures Library 4.0
Memory Structures Library (MemSL) is a complete data structures/collection classes library with memory tracing, memory debugging, entry/exit tracing, exception handling, definable memory handlers, built-in thread support, and much more. The...
839.68 KB  
Development Editors  -  JobyX 0.99.7-beta
JobyX is an ICS (Internet Chess Server) robot framework that provides basic robot functionality, including commands, lists, variables, avariables, and (in the new JobyX 2) full-blown Java-like exception handling. Commands, etc, are provided by...
71.68 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB