OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
Pid Class Reference

#include <Pid.h>

Public Types

enum  { ID_MAX = 0xFFFF >> 3 , ODM_FACE_ID_MAX = 0x3F , ODM_MODEL_ID_MAX = 0x7F }
 

Public Member Functions

constexpr Pid ()=default
 
constexpr Pid (ObjectType objectType, int id)
 
constexpr ObjectType type () const
 
constexpr int id () const
 
constexpr uint16_t packed () const
 
constexpr operator bool () const
 
constexpr bool operator! () const
 

Static Public Member Functions

static constexpr Pid door (int id)
 
static constexpr Pid item (int id)
 
static constexpr Pid actor (int id)
 
static constexpr Pid character (int id)
 
static constexpr Pid decoration (int id)
 
static constexpr Pid odmFace (int modelId, int faceId)
 
static constexpr Pid blvFace (int id)
 
static constexpr Pid dummy ()
 
static constexpr Pid fromPacked (uint16_t value)
 

Private Attributes

uint16_t _value = 0
 

Friends

constexpr bool operator== (const Pid &l, const Pid &r)=default
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ID_MAX 
ODM_FACE_ID_MAX 
ODM_MODEL_ID_MAX 

Constructor & Destructor Documentation

◆ Pid() [1/2]

constexpr Pid::Pid ( )
constexprdefault

◆ Pid() [2/2]

constexpr Pid::Pid ( ObjectType  objectType,
int  id 
)
inlineconstexpr

Member Function Documentation

◆ actor()

static constexpr Pid Pid::actor ( int  id)
inlinestaticconstexpr

◆ blvFace()

static constexpr Pid Pid::blvFace ( int  id)
inlinestaticconstexpr

◆ character()

static constexpr Pid Pid::character ( int  id)
inlinestaticconstexpr

◆ decoration()

static constexpr Pid Pid::decoration ( int  id)
inlinestaticconstexpr

◆ door()

static constexpr Pid Pid::door ( int  id)
inlinestaticconstexpr

◆ dummy()

static constexpr Pid Pid::dummy ( )
inlinestaticconstexpr
Returns
A dummy Pid that's valid, but doesn't represent any object.

◆ fromPacked()

static constexpr Pid Pid::fromPacked ( uint16_t  value)
inlinestaticconstexpr

◆ id()

constexpr int Pid::id ( ) const
inlineconstexpr

◆ item()

static constexpr Pid Pid::item ( int  id)
inlinestaticconstexpr

◆ odmFace()

static constexpr Pid Pid::odmFace ( int  modelId,
int  faceId 
)
inlinestaticconstexpr

◆ operator bool()

constexpr Pid::operator bool ( ) const
inlineexplicitconstexpr

◆ operator!()

constexpr bool Pid::operator! ( ) const
inlineconstexpr

◆ packed()

constexpr uint16_t Pid::packed ( ) const
inlineconstexpr

◆ type()

constexpr ObjectType Pid::type ( ) const
inlineconstexpr

Friends And Related Function Documentation

◆ operator==

constexpr bool operator== ( const Pid l,
const Pid r 
)
friend

Member Data Documentation

◆ _value

uint16_t Pid::_value = 0
private

The documentation for this class was generated from the following file: