AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::Hyperlinks::LinkTags::base_tag Struct Reference

#include "Hyperlinks.h"

Static Public Member Functions

static bool StoreTo (std::string_view &val, std::string_view data)
 
static bool StoreTo (std::string &val, std::string_view data)
 
template<typename T >
static std::enable_if_t< std::is_integral_v< T >, bool > StoreTo (T &val, std::string_view data)
 
static bool StoreTo (ObjectGuid &val, std::string_view data)
 

Detailed Description

Member Function Documentation

◆ StoreTo() [1/4]

static bool Acore::Hyperlinks::LinkTags::base_tag::StoreTo ( ObjectGuid val,
std::string_view  data 
)
inlinestatic
134 {
135 if (Optional<uint64> res = Acore::StringTo<uint64>(data, 16))
136 {
137 val.Set(*res);
138 return true;
139 }
140 else
141 return false;
142 }
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:24
void Set(uint64 guid)
Definition: ObjectGuid.h:137

References ObjectGuid::Set().

◆ StoreTo() [2/4]

static bool Acore::Hyperlinks::LinkTags::base_tag::StoreTo ( std::string &  val,
std::string_view  data 
)
inlinestatic
116 {
117 val.assign(data);
118 return true;
119 }

◆ StoreTo() [3/4]

static bool Acore::Hyperlinks::LinkTags::base_tag::StoreTo ( std::string_view &  val,
std::string_view  data 
)
inlinestatic
110 {
111 val = data;
112 return true;
113 }

Referenced by HyperlinkDataTokenizer::TryConsumeTo().

◆ StoreTo() [4/4]

template<typename T >
static std::enable_if_t< std::is_integral_v< T >, bool > Acore::Hyperlinks::LinkTags::base_tag::StoreTo ( T &  val,
std::string_view  data 
)
inlinestatic
123 {
124 if (Optional<T> res = Acore::StringTo<T>(data))
125 {
126 val = *res;
127 return true;
128 }
129 else
130 return false;
131 }