AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
flag96 Class Reference

#include "Util.h"

Public Member Functions

 flag96 (uint32 p1=0, uint32 p2=0, uint32 p3=0)
 
bool IsEqual (uint32 p1=0, uint32 p2=0, uint32 p3=0) const
 
bool HasFlag (uint32 p1=0, uint32 p2=0, uint32 p3=0) const
 
void Set (uint32 p1=0, uint32 p2=0, uint32 p3=0)
 
bool operator< (flag96 const &right) const
 
bool operator== (flag96 const &right) const
 
bool operator!= (flag96 const &right) const
 
flag96operator= (flag96 const &right)
 
 flag96 (const flag96 &)=default
 
 flag96 (flag96 &&)=default
 
flag96 operator& (flag96 const &right) const
 
flag96operator&= (flag96 const &right)
 
flag96 operator| (flag96 const &right) const
 
flag96operator|= (flag96 const &right)
 
flag96 operator~ () const
 
flag96 operator^ (flag96 const &right) const
 
flag96operator^= (flag96 const &right)
 
 operator bool () const
 
bool operator! () const
 
uint32operator[] (uint8 el)
 
uint32 const & operator[] (uint8 el) const
 

Private Attributes

uint32 part [3]
 

Detailed Description

Constructor & Destructor Documentation

◆ flag96() [1/3]

flag96::flag96 ( uint32  p1 = 0,
uint32  p2 = 0,
uint32  p3 = 0 
)
inline
452 {
453 part[0] = p1;
454 part[1] = p2;
455 part[2] = p3;
456 }
uint32 part[3]
Definition: Util.h:448

References part.

◆ flag96() [2/3]

flag96::flag96 ( const flag96 )
default

◆ flag96() [3/3]

flag96::flag96 ( flag96 &&  )
default

Member Function Documentation

◆ HasFlag()

◆ IsEqual()

bool flag96::IsEqual ( uint32  p1 = 0,
uint32  p2 = 0,
uint32  p3 = 0 
) const
inline
459 {
460 return (part[0] == p1 && part[1] == p2 && part[2] == p3);
461 }

References part.

Referenced by spell_rog_deadly_poison::HandleAfterHit(), and Unit::HandleDummyAuraProc().

◆ operator bool()

flag96::operator bool ( ) const
inline
561 {
562 return (part[0] != 0 || part[1] != 0 || part[2] != 0);
563 }

References part.

◆ operator!()

bool flag96::operator! ( ) const
inline
566 {
567 return !(bool(*this));
568 }

◆ operator!=()

bool flag96::operator!= ( flag96 const &  right) const
inline
502 {
503 return !(*this == right);
504 }

◆ operator&()

flag96 flag96::operator& ( flag96 const &  right) const
inline
517 {
518 return flag96(part[0] & right.part[0], part[1] & right.part[1], part[2] & right.part[2]);
519 }
Definition: Util.h:446

References part.

◆ operator&=()

flag96 & flag96::operator&= ( flag96 const &  right)
inline
522 {
523 part[0] &= right.part[0];
524 part[1] &= right.part[1];
525 part[2] &= right.part[2];
526 return *this;
527 }

References part.

◆ operator<()

bool flag96::operator< ( flag96 const &  right) const
inline
476 {
477 for (uint8 i = 3; i > 0; --i)
478 {
479 if (part[i - 1] < right.part[i - 1])
480 {
481 return true;
482 }
483 else if (part[i - 1] > right.part[i - 1])
484 {
485 return false;
486 }
487 }
488 return false;
489 }
std::uint8_t uint8
Definition: Define.h:110

References part.

◆ operator=()

flag96 & flag96::operator= ( flag96 const &  right)
inline
507 {
508 part[0] = right.part[0];
509 part[1] = right.part[1];
510 part[2] = right.part[2];
511 return *this;
512 }

References part.

◆ operator==()

bool flag96::operator== ( flag96 const &  right) const
inline
492 {
493 return
494 (
495 part[0] == right.part[0] &&
496 part[1] == right.part[1] &&
497 part[2] == right.part[2]
498 );
499 }

References part.

◆ operator[]() [1/2]

uint32 & flag96::operator[] ( uint8  el)
inline
571 {
572 return part[el];
573 }

References part.

◆ operator[]() [2/2]

uint32 const & flag96::operator[] ( uint8  el) const
inline
576 {
577 return part[el];
578 }

References part.

◆ operator^()

flag96 flag96::operator^ ( flag96 const &  right) const
inline
548 {
549 return flag96(part[0] ^ right.part[0], part[1] ^ right.part[1], part[2] ^ right.part[2]);
550 }

References part.

◆ operator^=()

flag96 & flag96::operator^= ( flag96 const &  right)
inline
553 {
554 part[0] ^= right.part[0];
555 part[1] ^= right.part[1];
556 part[2] ^= right.part[2];
557 return *this;
558 }

References part.

◆ operator|()

flag96 flag96::operator| ( flag96 const &  right) const
inline
530 {
531 return flag96(part[0] | right.part[0], part[1] | right.part[1], part[2] | right.part[2]);
532 }

References part.

◆ operator|=()

flag96 & flag96::operator|= ( flag96 const &  right)
inline
535 {
536 part[0] |= right.part[0];
537 part[1] |= right.part[1];
538 part[2] |= right.part[2];
539 return *this;
540 }

References part.

◆ operator~()

flag96 flag96::operator~ ( ) const
inline
543 {
544 return flag96(~part[0], ~part[1], ~part[2]);
545 }

References part.

◆ Set()

void flag96::Set ( uint32  p1 = 0,
uint32  p2 = 0,
uint32  p3 = 0 
)
inline
469 {
470 part[0] = p1;
471 part[1] = p2;
472 part[2] = p3;
473 }

References part.

Member Data Documentation

◆ part