AzerothCore 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
457 {
458 part[0] = p1;
459 part[1] = p2;
460 part[2] = p3;
461 }
uint32 part[3]
Definition: Util.h:453

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
464 {
465 return (part[0] == p1 && part[1] == p2 && part[2] == p3);
466 }

References part.

Referenced by spell_rog_deadly_poison::HandleAfterHit().

◆ operator bool()

flag96::operator bool ( ) const
inline
566 {
567 return (part[0] != 0 || part[1] != 0 || part[2] != 0);
568 }

References part.

◆ operator!()

bool flag96::operator! ( ) const
inline
571 {
572 return !(bool(*this));
573 }

◆ operator!=()

bool flag96::operator!= ( flag96 const &  right) const
inline
507 {
508 return !(*this == right);
509 }

◆ operator&()

flag96 flag96::operator& ( flag96 const &  right) const
inline
522 {
523 return flag96(part[0] & right.part[0], part[1] & right.part[1], part[2] & right.part[2]);
524 }
Definition: Util.h:451

References part.

◆ operator&=()

flag96 & flag96::operator&= ( flag96 const &  right)
inline
527 {
528 part[0] &= right.part[0];
529 part[1] &= right.part[1];
530 part[2] &= right.part[2];
531 return *this;
532 }

References part.

◆ operator<()

bool flag96::operator< ( flag96 const &  right) const
inline
481 {
482 for (uint8 i = 3; i > 0; --i)
483 {
484 if (part[i - 1] < right.part[i - 1])
485 {
486 return true;
487 }
488 else if (part[i - 1] > right.part[i - 1])
489 {
490 return false;
491 }
492 }
493 return false;
494 }
std::uint8_t uint8
Definition: Define.h:109

References part.

◆ operator=()

flag96 & flag96::operator= ( flag96 const &  right)
inline
512 {
513 part[0] = right.part[0];
514 part[1] = right.part[1];
515 part[2] = right.part[2];
516 return *this;
517 }

References part.

◆ operator==()

bool flag96::operator== ( flag96 const &  right) const
inline
497 {
498 return
499 (
500 part[0] == right.part[0] &&
501 part[1] == right.part[1] &&
502 part[2] == right.part[2]
503 );
504 }

References part.

◆ operator[]() [1/2]

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

References part.

◆ operator[]() [2/2]

uint32 const & flag96::operator[] ( uint8  el) const
inline
581 {
582 return part[el];
583 }

References part.

◆ operator^()

flag96 flag96::operator^ ( flag96 const &  right) const
inline
553 {
554 return flag96(part[0] ^ right.part[0], part[1] ^ right.part[1], part[2] ^ right.part[2]);
555 }

References part.

◆ operator^=()

flag96 & flag96::operator^= ( flag96 const &  right)
inline
558 {
559 part[0] ^= right.part[0];
560 part[1] ^= right.part[1];
561 part[2] ^= right.part[2];
562 return *this;
563 }

References part.

◆ operator|()

flag96 flag96::operator| ( flag96 const &  right) const
inline
535 {
536 return flag96(part[0] | right.part[0], part[1] | right.part[1], part[2] | right.part[2]);
537 }

References part.

◆ operator|=()

flag96 & flag96::operator|= ( flag96 const &  right)
inline
540 {
541 part[0] |= right.part[0];
542 part[1] |= right.part[1];
543 part[2] |= right.part[2];
544 return *this;
545 }

References part.

◆ operator~()

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

References part.

◆ Set()

void flag96::Set ( uint32  p1 = 0,
uint32  p2 = 0,
uint32  p3 = 0 
)
inline
474 {
475 part[0] = p1;
476 part[1] = p2;
477 part[2] = p3;
478 }

References part.

Member Data Documentation

◆ part