check.hh File Reference

#include <lestes/std/lassert.hh>

Go to the source code of this file.

Defines

#define checked(x)   (lassert2((x),"Checked pointer is NULL."),(x))
 Check value for non-NULL-ness and return it.
#define checked_ucn_string(x)   (lassert2( !((x).empty()), "Checked ucn_string is empty." ),(x))
 Checks given string for non-emptiness and return it.
#define one_shot_unchecked(ward, expr)
 helper macro for specialized checking, which is permisive for the first time only


Detailed Description

The checked() macro and similar ones.
Author:
Rudo

Definition in file check.hh.


Define Documentation

#define checked (  )     (lassert2((x),"Checked pointer is NULL."),(x))

Check value for non-NULL-ness and return it.

Definition at line 43 of file check.hh.

Referenced by lestes::lang::cplus::syn::bison_token::create(), lestes::lang::cplus::sem::sa_context_manager_concrete::current(), lestes::lang::cplus::syn::hinter::hint(), lestes::lang::cplus::sem::lu_lookup_in_type::main(), lestes::lang::cplus::syn::bison_token::value_get(), and lestes::lang::cplus::syn::bison_token::wrapped_token_get().

#define checked_ucn_string (  )     (lassert2( !((x).empty()), "Checked ucn_string is empty." ),(x))

Checks given string for non-emptiness and return it.

Author:
Rudo

Definition at line 51 of file check.hh.

#define one_shot_unchecked ( ward,
expr   ) 

Value:

(lassert2(!(ward) || (expr), \
                "Checked pointer is NULL, and this is not the first attempt " \
                "to set the checked value."),\
         ((ward) = true), \
         (expr))
helper macro for specialized checking, which is permisive for the first time only

Parameters:
ward The name of the protective boolean variable.
expr The expression to check.
Author:
TMA

Definition at line 61 of file check.hh.


Generated on Mon Feb 12 18:23:45 2007 for lestes by doxygen 1.5.1-20070107