icedb  version 0.5.1
Snow particle scattering database API
Public Member Functions | Public Attributes | List of all members
icedb::Examples::Shapes::ScopedHandles::ScopedHandle< HandleType, InvalidValueClass, CloseMethod > Struct Template Reference

Public Member Functions

bool valid () const
 
 ~ScopedHandle ()
 
 ScopedHandle (HandleType newh)
 

Public Attributes

HandleType h = 0
 

Detailed Description

template<typename HandleType, class InvalidValueClass, class CloseMethod>
struct icedb::Examples::Shapes::ScopedHandles::ScopedHandle< HandleType, InvalidValueClass, CloseMethod >

Todo:
Extend with SFINAE and constexpr type detection for InvalidValueClass and CloseMethod. If these are not specified as template parameters, then they must be passed in the constructor.

Definition at line 57 of file shapeIOpsu.cpp.

Constructor & Destructor Documentation

◆ ~ScopedHandle()

template<typename HandleType , class InvalidValueClass , class CloseMethod >
icedb::Examples::Shapes::ScopedHandles::ScopedHandle< HandleType, InvalidValueClass, CloseMethod >::~ScopedHandle ( )
inline

Definition at line 61 of file shapeIOpsu.cpp.

61  {
62  if (valid()) CloseMethod::Close(h);
63  h = 0;
64  }

◆ ScopedHandle()

template<typename HandleType , class InvalidValueClass , class CloseMethod >
icedb::Examples::Shapes::ScopedHandles::ScopedHandle< HandleType, InvalidValueClass, CloseMethod >::ScopedHandle ( HandleType  newh)
inline

Definition at line 65 of file shapeIOpsu.cpp.

Member Function Documentation

◆ valid()

template<typename HandleType , class InvalidValueClass , class CloseMethod >
bool icedb::Examples::Shapes::ScopedHandles::ScopedHandle< HandleType, InvalidValueClass, CloseMethod >::valid ( ) const
inline

Definition at line 60 of file shapeIOpsu.cpp.

Referenced by icedb::Examples::Shapes::readDataset(), and icedb::Examples::Shapes::readPSUfile().

60 { return !InvalidValueClass::isInvalid(h); }
Here is the caller graph for this function:

Member Data Documentation

◆ h

template<typename HandleType , class InvalidValueClass , class CloseMethod >
HandleType icedb::Examples::Shapes::ScopedHandles::ScopedHandle< HandleType, InvalidValueClass, CloseMethod >::h = 0

The documentation for this struct was generated from the following file: