library of assembled shared sources

http://lass.cocamware.com

enforcer.h File Reference

#include "util_common.h"
#include "impl/lass_errno.h"
#include "impl/enforcer_impl.h"
#include <string>
#include <sstream>

Include dependency graph for enforcer.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Data Structures

class  lass::util::EnforceFailure
 Exception thrown by enforcers. More...

Namespaces

namespace  lass
 Library for Assembled Shared Sources.
namespace  lass::util
 general utility, debug facilities, .

Defines

#define LASS_ENFORCE(expression)
 Enforces the expression to be "true", by using operator!.
#define LASS_ENFORCE_POINTER(pointer)
 Enforces a pointer to be different than the NULL pointer.
#define LASS_ENFORCE_STREAM(stream)
 Enforces a stream to be in the good state.
#define LASS_ENFORCE_ZERO(expression)
 Enforces the result of the expression to be zero.
#define LASS_ENFORCE_CLIB(functionCall)
 Enforces the return code of a CLIB function call to be different than -1.
#define LASS_ENFORCE_CLIB_EX(functionCall, errorValue)
#define LASS_WARN_CLIB(functionCall)
#define LASS_ENFORCE_CLIB_RC(errorCode)
 Enforces the return code of a CLIB function call to be zero.
#define LASS_WARN_CLIB_RC(errorCode)
 Enforces the return code of a CLIB function call to be zero.
#define LASS_ENFORCE_COM(comResult)
 Enforces the HRESULT of a COM call to be 0 or more.
#define LASS_ENFORCE_INDEX(index, size)
 Enforces an index to be in the half open range [0, iSize).
#define LASS_ENFORCE_DYNAMIC_CAST(t_DestPointer, v_pointer)
 Enforces a pointer to an object to be dynamic casted to related type.
#define LASS_ENFORCE_DYNAMIC_PY_CAST(t_DestPyObjectPtr, v_pyObjectPtr)
 Enforces a python shared pointer to be dynamic casted to a related python shared pointer.
#define LASS_ENFORCE_UNREACHABLE
 always-failing enforcer to block unreachable code paths


Detailed Description

Author:
Bram de Greve (bramz@users.sourceforge.net)

Tom De Muer (tomdemuer@users.sourceforge.net)

*** BEGIN LICENSE INFORMATION ***

The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://lass.sourceforge.net/cpal-license. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is LASS - Library of Assembled Shared Sources.

The Initial Developer of the Original Code is Bram de Greve and Tom De Muer. The Original Developer is the Initial Developer.

All portions of the code written by the Initial Developer are: Copyright (C) 2004-2007 the Initial Developer. All Rights Reserved.

Contributor(s):

Alternatively, the contents of this file may be used under the terms of the GNU General Public License Version 2 or later (the GPL), in which case the provisions of GPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the GPL and not to allow others to use your version of this file under the CPAL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL License. If you do not delete the provisions above, a recipient may use your version of this file under either the CPAL or the GPL.

*** END LICENSE INFORMATION ***

Definition in file enforcer.h.


Define Documentation

#define LASS_ENFORCE_CLIB_EX ( functionCall,
errorValue   ) 

Value:

*LASS_UTIL_IMPL_MAKE_ENFORCER(\
        ::lass::util::impl::UnequalPredicate,\
        ::lass::util::impl::ClibRaiser,\
        (functionCall), \
        (errorValue), \
        "'" LASS_STRINGIFY(functionCall) "' in '" LASS_HERE "'")

Definition at line 150 of file enforcer.h.

Referenced by lass::io::impl::BinaryIMemoryMapImpl::remap().

#define LASS_WARN_CLIB ( functionCall   ) 

#define LASS_ENFORCE_UNREACHABLE

Value:

*LASS_UTIL_IMPL_MAKE_ENFORCER(\
        ::lass::util::impl::TruePredicate,\
        ::lass::util::impl::DefaultRaiser,\
        (false),\
        int(0), \
        "You have reached unreachable code in '" LASS_HERE "'.")
always-failing enforcer to block unreachable code paths

Definition at line 304 of file enforcer.h.

Referenced by lass::prim::SimplePolygon3D< T, PlaneEquationPolicy, PlaneNormalizingPolicy >::clip().


Generated on Mon Nov 10 14:22:04 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo