Classes | Namespaces | Defines | Functions

/home/hauberg/Dokumenter/Capture/humim-tracker-0.1/src/ntk/utils/common.h File Reference

#include <ntk/core.h>
#include <exception>

Go to the source code of this file.

Classes

class  ntk::Ptr< _Tp >
struct  ntk::Ptr< _Tp >::DynamicCastTag
class  ntk::exception

Namespaces

namespace  cv
namespace  ntk

Defines

#define ntk_ptr_typedefs(Class)
#define ntk_stringify(Code)   #Code
#define NTK_EXPORTS
#define stl_bounds(s)   s.begin(), s.end()
#define foreach_idx(Idxname, Vector)   for (size_t Idxname = 0; Idxname < (size_t)Vector.size(); ++Idxname)
#define foreach_uidx(Idxname, Vector)   for (unsigned Idxname = 0; Idxname < (unsigned)Vector.size(); ++Idxname)
#define foreach_it(Itname, Instance, Type)   for (Type::iterator Itname = Instance.begin(); Itname != Instance.end(); ++Itname)
#define foreach_const_it(Itname, Instance, Type)   for (Type::const_iterator Itname = Instance.begin(); Itname != Instance.end(); ++Itname)
#define cat2(a, b)   a,b
#define cat3(a, b, c)   a,b,c
#define cat4(a, b, c, d)   a,b,c,d
#define ntk_throw_exception(msg)
#define ntk_throw_exception_if(cond, msg)

Functions

CV_EXPORTS void * cv::fastMalloc (size_t)
CV_EXPORTS void cv::fastFree (void *ptr)
template<typename _Tp , typename _Up >
Ptr< _Tp > ntk::dynamic_Ptr_cast (const Ptr< _Up > &ptr)
template<class T >
ntk::Ptr< T > ntk::toPtr (T *ptr)

Define Documentation

#define cat2 (   a,
  b 
)    a,b
#define cat3 (   a,
  b,
  c 
)    a,b,c
#define cat4 (   a,
  b,
  c,
  d 
)    a,b,c,d
#define foreach_const_it (   Itname,
  Instance,
  Type 
)    for (Type::const_iterator Itname = Instance.begin(); Itname != Instance.end(); ++Itname)
#define foreach_idx (   Idxname,
  Vector 
)    for (size_t Idxname = 0; Idxname < (size_t)Vector.size(); ++Idxname)
#define foreach_it (   Itname,
  Instance,
  Type 
)    for (Type::iterator Itname = Instance.begin(); Itname != Instance.end(); ++Itname)
#define foreach_uidx (   Idxname,
  Vector 
)    for (unsigned Idxname = 0; Idxname < (unsigned)Vector.size(); ++Idxname)
#define NTK_EXPORTS
#define ntk_ptr_typedefs (   Class  ) 
Value:
typedef ntk::Ptr<Class> Class##Ptr; \
typedef ntk::Ptr<const Class> Class##ConstPtr;

This file is part of the nestk library.

This program 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.

This program 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 this program. If not, see <http://www.gnu.org/licenses/>.

Author: Nicolas Burrus <nicolas.burrus@uc3m.es>, (C) 2010

#define ntk_stringify (   Code  )     #Code
#define ntk_throw_exception (   msg  ) 
Value:
{ \
  std::string s (PRETTY_FUNCTION); s = (s + ": ") + msg; \
  throw ntk::exception(s); \
}
#define ntk_throw_exception_if (   cond,
  msg 
)
Value:
{ \
  if (cond) \
  { \
    std::string s (PRETTY_FUNCTION); s = (s + ": ") + msg; \
    throw ntk::exception(s); \
  } \
}
#define stl_bounds (   s  )     s.begin(), s.end()