/usr/include/trilinos/MLAPI_Operator_Box.h is in libtrilinos-ml-dev 12.12.1-5.
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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | #ifndef MLAPI_OPERATOR_BOX_H
#define MLAPI_OPERATOR_BOX_H
/*!
\file MLAPI_Operator_Box.h
\brief Wrapper for ML_Operator to make it suitable for RefCountPtr.
\author Marzio Sala, D-INFK/ETHZ.
\date Last updated on Mar-06.
*/
/* ******************************************************************** */
/* See the file COPYRIGHT for a complete copyright notice, contact */
/* person and disclaimer. */
/* ******************************************************************** */
#include "ml_operator.h"
namespace MLAPI {
/*!
\class ML_Operator_Box
\brief Simple wrapper for ML_Operator struct.
\author Marzio Sala, SNL 9214.
\date Last updated on Feb-05.
*/
class ML_Operator_Box {
public:
//! Constructor.
ML_Operator_Box(ML_Operator* Op, bool Ownership = true)
{
Op_ = Op;
Ownership_ = Ownership;
}
//! Destructor.
~ML_Operator_Box()
{
if (Op_ && Ownership_)
ML_Operator_Destroy(&Op_);
}
//! Returns a pointer to the internally stored ML_Operator.
ML_Operator* GetData() const
{
return(Op_);
}
private:
//! Pointer to ML_Operator struct.
ML_Operator* Op_;
//! If \c true, the destructor will delete \c Op_.
bool Ownership_;
};
} // namespace MLAPI
#endif // MLAPI_OPERATOR_BOX_H
|