CVR-Lib last update 20 Sep 2009

cvrConstantReferenceType.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2006
00003  * Pablo Alvarado, Instituto Tecnológico de Costa Rica
00004  *
00005  *
00006  * This file is part of the Computer Vision and Robotics Library (CVR-Lib)
00007  *
00008  * The CVR-Lib is free software; you can redistribute it and/or
00009  * modify it under the terms of the BSD License.
00010  *
00011  * All rights reserved.
00012  *
00013  * Redistribution and use in source and binary forms, with or without
00014  * modification, are permitted provided that the following conditions are met:
00015  *
00016  * 1. Redistributions of source code must retain the above copyright notice,
00017  *    this list of conditions and the following disclaimer.
00018  *
00019  * 2. Redistributions in binary form must reproduce the above copyright notice,
00020  *    this list of conditions and the following disclaimer in the documentation
00021  *    and/or other materials provided with the distribution.
00022  *
00023  * 3. Neither the name of the authors nor the names of its contributors may be
00024  *    used to endorse or promote products derived from this software without
00025  *    specific prior written permission.
00026  *
00027  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00028  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00031  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00032  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00033  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00034  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00035  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00036  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00037  * POSSIBILITY OF SUCH DAMAGE.
00038  */
00039 
00040 
00041 /**
00042  * \file   cvrConstantReferenceType.h
00043  *         Contains the enum eConstantReferece which provides global
00044  *         constants to control the behaviour of memory allocation. The
00045  *         appropriate read and write functions are also defined.
00046  * \author Pablo Alvarado
00047  * \date   09.09.2006
00048  * $Id: cvrConstantReferenceType.h,v 1.3 2007/04/18 21:13:40 alvarado Exp $
00049 f */
00050 
00051 #ifndef _CVR_CONSTANT_REFERENCE_H_
00052 #define _CVR_CONSTANT_REFERENCE_H_
00053 
00054 #include "cvrIoHandler.h"
00055 
00056 namespace cvr {
00057 
00058   /**
00059    * The constant reference type is used to indicate if the memory allocated
00060    * by vectors, matrices and tensors can be modified or not.
00061    *
00062    * It is used to avoid that the subtensors (or vectors) of tensors (or
00063    * matrices) modified the memory they use, because it is allocated outside.
00064    *
00065    * @ingroup gTypes
00066    */
00067   enum eConstantReference {
00068     VariableReference, /**< Referece is allowed to be modified */
00069     ConstantReference  /**< Reference cannot be modified */
00070   };
00071 
00072   /**
00073    * Read function for eResizeType.
00074    *
00075    * @ingroup gStorable
00076    */
00077   bool read(ioHandler& handler,eConstantReference& data);
00078 
00079   /**
00080    * Write function for eResizeType.
00081    *
00082    * @ingroup gStorable
00083    */
00084   bool write(ioHandler& handler,const eConstantReference& data);
00085 
00086 
00087 }
00088 #endif

Generated on Sun Sep 20 22:07:59 2009 for CVR-Lib by Doxygen 1.5.8