|
struct | fge::net::rules::ChainedArguments< TValue > |
| This is a wrapper around a Packet and a value for safe extraction. More...
|
|
enum class | ROutputs : bool { R_NORMAL = false
, R_INVERTED = true
} |
|
template<class TValue , ROutputs TOutput = ROutputs::R_NORMAL> |
constexpr ChainedArguments< TValue > | fge::net::rules::RRange (TValue const &min, TValue const &max, ChainedArguments< TValue > &&args) |
| Range rule, check if the value is in the min/max range.
|
|
template<class TValue > |
constexpr ChainedArguments< TValue > | fge::net::rules::RValid (ChainedArguments< TValue > &&args) |
| Valid rule, check if the value is correctly extracted.
|
|
template<class TValue , ROutputs TOutput = ROutputs::R_NORMAL> |
constexpr ChainedArguments< TValue > | fge::net::rules::RMustEqual (TValue const &a, ChainedArguments< TValue > &&args) |
| Must equal rule, check if the value is equal to the provided one.
|
|
template<class TValue , ROutputs TOutput = ROutputs::R_NORMAL> |
constexpr ChainedArguments< TValue > | fge::net::rules::RStrictLess (TValue less, ChainedArguments< TValue > &&args) |
| Strict less rule, check if the value is strictly lesser than the provided one.
|
|
template<class TValue , ROutputs TOutput = ROutputs::R_NORMAL> |
constexpr ChainedArguments< TValue > | fge::net::rules::RLess (TValue less, ChainedArguments< TValue > &&args) |
| Less rule, check if the value is lesser than the provided one.
|
|
template<class TValue , ROutputs TOutput = ROutputs::R_NORMAL> |
constexpr ChainedArguments< TValue > | fge::net::rules::RSizeRange (SizeType min, SizeType max, ChainedArguments< TValue > &&args) |
| Size range rule, check if the size is in the min/max range.
|
|
template<class TValue , ROutputs TOutput = ROutputs::R_NORMAL> |
constexpr ChainedArguments< TValue > | fge::net::rules::RSizeMustEqual (fge::net::SizeType a, ChainedArguments< TValue > &&args) |
| Size must equal rule, check if the size is equal to the provided one.
|
|
template<class TValue , ROutputs TOutput = ROutputs::R_NORMAL> |
constexpr ChainedArguments< TValue > | fge::net::rules::RMustValidUtf8 (ChainedArguments< TValue > &&args) |
| Check if the extracted string is a valid UTF8 string.
|
|
Everything related to network rules.
Network rules are utilities that make sure that the data inside of a packet is valid before extracting and using it.
template<class TValue , ROutputs TOutput = ROutputs::R_NORMAL>
Size range rule, check if the size is in the min/max range.
This function will peek the current fge::net::SizeType at read pos. It is useful to apply rules on the size of something (string, container, ...) before extracting it.
The actual value will not be extracted here.
- Template Parameters
-
TValue | The type of the value |
TOutput | Control how the rule will output |
- Parameters
-
min | The minimum range |
max | The maximum range |
args | The chained argument |
- Returns
- The chained argument