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
132 {
133 if (Optional<uint64> res = Acore::StringTo<uint64>(data, 16))
134 {
135 val.Set(*res);
136 return true;
137 }
138 else
139 return false;
140 }
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
114 {
115 val.assign(data);
116 return true;
117 }

◆ StoreTo() [3/4]

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

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
121 {
122 if (Optional<T> res = Acore::StringTo<T>(data))
123 {
124 val = *res;
125 return true;
126 }
127 else
128 return false;
129 }