Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-23 09:18:00

0001 // Created on: 2016-06-23
0002 // Copyright (c) 2016 OPEN CASCADE SAS
0003 // Created by: Oleg AGASHIN
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _IMeshData_StatusOwner_HeaderFile
0017 #define _IMeshData_StatusOwner_HeaderFile
0018 
0019 #include <IMeshData_Status.hxx>
0020 
0021 //! Extension interface class providing status functionality.
0022 class IMeshData_StatusOwner
0023 {
0024 public:
0025   //! Destructor.
0026   virtual ~IMeshData_StatusOwner() = default;
0027 
0028   //! Returns true in case if status is strictly equal to the given value.
0029   bool IsEqual(const IMeshData_Status theValue) const { return (myStatus == theValue); }
0030 
0031   //! Returns true in case if status is set.
0032   bool IsSet(const IMeshData_Status theValue) const { return (myStatus & theValue) != 0; }
0033 
0034   //! Adds status to status flags of a face.
0035   void SetStatus(const IMeshData_Status theValue) { myStatus |= theValue; }
0036 
0037   //! Adds status to status flags of a face.
0038   void UnsetStatus(const IMeshData_Status theValue) { myStatus &= ~theValue; }
0039 
0040   //! Returns complete status mask.
0041   int GetStatusMask() const { return myStatus; }
0042 
0043 protected:
0044   //! Constructor. Initializes default status.
0045   IMeshData_StatusOwner()
0046       : myStatus(IMeshData_NoError)
0047   {
0048   }
0049 
0050 private:
0051   int myStatus;
0052 };
0053 
0054 #endif