simplevector.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2007 SCHUNK GmbH & Co. KG
00003  * Copyright (c) 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *   http://www.apache.org/licenses/LICENSE-2.0
00010 
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 //======================================================================
00045 //======================================================================
00046 
00047 #ifndef SIMPLEVECTOR_H_
00048 #define SIMPLEVECTOR_H_
00049 
00050 #include "sdhlibrary_settings.h"
00051 
00052 #if SDH_USE_VCC
00053 # pragma warning(disable : 4290)
00054 #endif
00055 
00056 //----------------------------------------------------------------------
00057 // System Includes - include with <>
00058 //----------------------------------------------------------------------
00059 
00060 
00061 //----------------------------------------------------------------------
00062 // Project Includes - include with ""
00063 //----------------------------------------------------------------------
00064 
00065 #include "sdhexception.h"
00066 
00067 //----------------------------------------------------------------------
00068 // Defines, enums, unions, structs,
00069 //----------------------------------------------------------------------
00070 
00071 NAMESPACE_SDH_START
00072 
00073 
00074 //----------------------------------------------------------------------
00075 // Global variables
00076 //----------------------------------------------------------------------
00077 
00078 
00079 //----------------------------------------------------------------------
00080 // Function implementation (function definitions)
00081 //----------------------------------------------------------------------
00082 
00083 
00084 //----------------------------------------------------------------------
00085 // Class declarations
00086 //----------------------------------------------------------------------
00087 
00091 class VCC_EXPORT cSimpleVectorException: public cSDHLibraryException
00092 {
00093 public:
00094   cSimpleVectorException(cMsg const & _msg)
00095     : cSDHLibraryException("cSimpleVectorException", _msg)
00096   {}
00097 };
00098 //======================================================================
00099 
00100 
00102 
00108 class VCC_EXPORT cSimpleVector
00109 {
00110 public:
00112   enum
00113   {
00114     eNUMBER_OF_ELEMENTS = 7 
00115   };
00116 
00118   cSimpleVector()
00119   throw (cSimpleVectorException*);
00120 
00121 
00123   cSimpleVector(int nb_values, char const* str)
00124   throw (cSimpleVectorException*);
00125 
00126 
00128   cSimpleVector(int nb_values, int start_index, char const* str)
00129   throw (cSimpleVectorException*);
00130 
00132   cSimpleVector(int nb_values, int start_index, float* values)
00133   throw (cSimpleVectorException*);
00134 
00135 
00137   void FromString(int nb_values, int start_index, char const* str)
00138   throw (cSimpleVectorException*);
00139 
00140 
00142   double& operator[](unsigned int index);
00143 
00144 
00146   double& x(void);
00147 
00148 
00150   double& y(void);
00151 
00152 
00154   double& z(void);
00155 
00157   bool Valid(unsigned int index) const;
00158 
00159 protected:
00160 
00161   double value[ eNUMBER_OF_ELEMENTS ];
00162 
00164   int valid;
00165 
00166 }; // cSimpleVector
00167 //-----------------------------------------------------------------
00168 
00169 NAMESPACE_SDH_END
00170 
00171 #endif
00172 
00173 
00174 //======================================================================
00175 /*
00176   Here are some settings for the emacs/xemacs editor (and can be safely ignored):
00177   (e.g. to explicitely set C++ mode for *.h header files)
00178 
00179   Local Variables:
00180   mode:C++
00181   mode:ELSE
00182   End:
00183 */
00184 //======================================================================


schunk_sdh
Author(s): Mathias Luedtke , Florian Weisshardt
autogenerated on Sat Jun 8 2019 20:25:21