/usr/include/polybori/common/CCheckedIdx.h is in libpolybori-dev 0.8.3-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | // -*- c++ -*-
//*****************************************************************************
/** @file CCheckedIdx.h
*
* @author
* @date
*
*
*
* @par Copyright:
* (c) by The PolyBoRi Team
*
**/
//*****************************************************************************
#ifndef polybori_common_CCheckedIdx_h_
#define polybori_common_CCheckedIdx_h_
// include basic definitions
#include <polybori/pbori_defs.h>
BEGIN_NAMESPACE_PBORI
/** @class CCheckedIdx
* @brief This class defines CCheckedIdx.
*
* It checks the the range of CTypes::idx_type;
**/
class CCheckedIdx:
public CTypes::auxtypes_type {
/// Type of *this
typedef CCheckedIdx self;
public:
CCheckedIdx(idx_type idx): m_idx(idx) {
if PBORI_UNLIKELY(idx < 0) handle_error();
}
CCheckedIdx(const self& rhs): m_idx(rhs.m_idx) { }
~CCheckedIdx() {}
operator idx_type() const { return m_idx; }
private:
void handle_error() const;
idx_type m_idx;
};
END_NAMESPACE_PBORI
#endif
|