Commit f98ad547 authored by Mathias Goldau's avatar Mathias Goldau
Browse files

[DOC] Now there is a global place WDefines.h where to place Macros like...

[DOC] Now there is a global place WDefines.h where to place Macros like OW_API_DEPRECATED. Additionally there is shown how we should document those macros.
parent e7aa0733
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#include "WDefines.h"
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WDEFINES_H
#define WDEFINES_H
/**
* \defgroup macros Macros
*
* This are macros used in OpenWalnut. Generally speaking we want to use as less macros as possible, so introduce new macros only if you have read:
* http://www.parashift.com/c++-faq-lite/inline-functions.html#faq-9.5 esp. all four "why are macros - evil" pages.
*/
/**
* \ingroup macros
* \def OW_API_DEPRECATED
* In order to mark functions for the compiler as deprecated we need to put this before each deprecated funtion to get compiler warnings whenever this function is used.
* \note This macro is defined in here, since almost every header of the dataHandler includes this header.
*/
#if ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) )
#define OW_API_DEPRECATED __attribute__( ( __deprecated__ ) )
#else
#define OW_API_DEPRECATED
#endif /* __GNUC__ */
#endif // WDEFINES_H
......@@ -32,6 +32,7 @@
#include <osg/ref_ptr>
#include "../common/WDefines.h"
#include "../common/WProperties.h"
#include "../common/WTransferable.h"
#include "WDataTexture3D_2.h"
......@@ -41,12 +42,6 @@ class WDataTexture3D;
class WCondition;
class WDataSetVector;
#if ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) )
#define OW_API_DEPRECATED __attribute__( ( __deprecated__ ) )
#else
#define OW_API_DEPRECATED
#endif /* __GNUC__ */
/**
* Base class for all data set types. This class has a number of subclasses
* specifying the different types of data sets. Two of the dataset types
......
......@@ -25,20 +25,21 @@
#ifndef WEXPORTDATAHANDLER_H
#define WEXPORTDATAHANDLER_H
/**
* \ingroup macros
* \def OWDATAHANDLER_EXPORT
* In order to export symbols for shared libraries on Windows we need to put this before each class.
* \note Unfortunately we need to end those lines with " // NOLINT preliminary macro" since out style checker cannot handle this.
*/
#ifdef _MSC_VER
#pragma warning( disable: 4251 )
#if defined( owdataHandler_EXPORTS ) || defined( OWdataHandler_EXPORTS )
#define OWDATAHANDLER_EXPORT __declspec( dllexport )
#define OWDATAHANDLER_EXPORT __declspec( dllexport )
#else
#define OWDATAHANDLER_EXPORT __declspec( dllimport )
#define OWDATAHANDLER_EXPORT __declspec( dllimport )
#endif
#else
#define OWDATAHANDLER_EXPORT
#endif // _MSC_VER
#endif // WEXPORTDATAHANDLER_H
......
......@@ -60,7 +60,9 @@ public:
size_t size() const;
/**
* \return The bounding box of the grid.
* Axis aligned Bounding Box that encloses this grid.
*
* \return \copybrief WGrid::getBoundingBox()
*/
virtual WBoundingBox getBoundingBox() const = 0;
......
......@@ -40,6 +40,7 @@
#include "../common/math/WVector3D.h"
#include "../common/WBoundingBox.h"
#include "../common/WCondition.h"
#include "../common/WDefines.h"
#include "WExportDataHandler.h"
#include "WGrid.h"
#include "WGridTransformOrtho.h"
......@@ -158,6 +159,8 @@ public:
WMatrix< double > getTransformationMatrix() const;
/**
* \copybrief WGrid::getBoundingBox()
* \return \copybrief WGrid::getBoundingBox()
*/
WBoundingBox getBoundingBox() const;
......@@ -203,12 +206,16 @@ public:
const WMatrix4x4& getTexToWorldMatrix() const;
/**
* This method returns the condition that fires on changes in this grid's transformation matrix. This is ugly and should not be used since,
* technically, we want const grids. For WDataTexture_2, this is needed right now because we have a module which allows modification of the
* grid transformation (dataManipulator). Remove this if the grid really is const as it is not needed anymore.
* The condition that fires on changes in this grid's transformation matrix.
*
* \return the condition
* \warning This is ugly and should not be used since, technically, we want const grids. For WDataTexture_2, this is needed
* right now because we have a module which allows modification of the grid transformation (dataManipulator). Remove this if
* the grid really is const as it is not needed anymore.
*
* \return \copybrief WGridRegular3D::getTransformationUpdateCondition()
* \deprecated
*/
OW_API_DEPRECATED
WCondition::SPtr getTransformationUpdateCondition() const;
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment