A library to express information in a functional way that allows for easy auto-complete and shorter expressions. More...
#include <algorithm>
#include <functional>
#include <iterator>
#include <map>
#include <optional>
#include <random>
#include <set>
#include <tuple>
#include <type_traits>
#include <utility>
#include <valarray>
#include <variant>
#include <vector>
#include "asserts.h"
#include "traits.h"
#include "transforms.h"
Go to the source code of this file.
Classes | |
class | fcpp::Queryable< T > |
Core object used to query items and hold the sequence state. More... | |
class | fcpp::WhenTrue< T > |
True / if block query of Queryable<T>::branch method. More... | |
class | fcpp::WhenFalse< WhenTrueQueriedT, T > |
False / else block query of Queryable<T>::branch method. More... | |
class | fcpp::Merge< TrueT, FalseT > |
Merge result of both if and else block queries from Queryable<T>::branch method. More... | |
class | fcpp::Queryable< T > |
Core object used to query items and hold the sequence state. More... | |
class | fcpp::Merge< TrueT, FalseT > |
Merge result of both if and else block queries from Queryable<T>::branch method. More... | |
class | fcpp::WhenFalse< WhenTrueQueriedT, T > |
False / else block query of Queryable<T>::branch method. More... | |
class | fcpp::WhenTrue< T > |
True / if block query of Queryable<T>::branch method. More... | |
Macros | |
#define | EXPR(...) __GET_MACRO__(__VA_ARGS__, __EXPR2__, __EXPR1__)(auto, __VA_ARGS__) |
Syntactic sugar for terse expressions using pass by value. More... | |
#define | CR_EXPR(...) __GET_MACRO__(__VA_ARGS__, __EXPR2__, __EXPR1__)(const auto &, __VA_ARGS__) |
Syntactic sugar for terse expressions using pass by constant reference. More... | |
Functions | |
template<typename T > | |
Queryable< T > | fcpp::query (std::vector< T > items) |
Queries the sequence of items using a vector. More... | |
template<typename T > | |
bool | fcpp::operator== (const Queryable< T > &lhs, const std::vector< T > &rhs) |
template<typename T > | |
bool | fcpp::operator== (const Queryable< T > &lhs, const Queryable< T > &rhs) |
Detailed Description
A library to express information in a functional way that allows for easy auto-complete and shorter expressions.
- Version
- 0.1
- Date
- 2021-08-20
- Copyright
- Copyright 2021 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Macro Definition Documentation
◆ CR_EXPR
#define CR_EXPR | ( | ... | ) | __GET_MACRO__(__VA_ARGS__, __EXPR2__, __EXPR1__)(const auto &, __VA_ARGS__) |
Syntactic sugar for terse expressions using pass by constant reference.
- List of variable names passed in.
- Returns
- Produced value of the variables and operations evaluated.
◆ EXPR
#define EXPR | ( | ... | ) | __GET_MACRO__(__VA_ARGS__, __EXPR2__, __EXPR1__)(auto, __VA_ARGS__) |
Syntactic sugar for terse expressions using pass by value.
- List of variable names passed in.
- Returns
- Produced value of the variables and operations evaluated.
Function Documentation
◆ operator==() [1/2]
bool fcpp::operator== | ( | const Queryable< T > & | lhs, |
const Queryable< T > & | rhs | ||
) |
- Parameters
-
lhs Left operand Queryable<T> to compare. rhs Right operand Queryable<T> to compare.
- Returns
- true if both sides are equal.
- false if both side are not equal.
◆ operator==() [2/2]
bool fcpp::operator== | ( | const Queryable< T > & | lhs, |
const std::vector< T > & | rhs | ||
) |
- Remarks
- Based off of internal items_ stored inside Queryable<T>.
- Parameters
-
lhs Left operand Queryable<T> to compare. rhs Right operand std::vector<T> to compare.
- Returns
- true if both sides are equal.
- false if both side are not equal.
◆ query()
Queryable< T > fcpp::query | ( | std::vector< T > | items | ) |
Queries the sequence of items using a vector.
- Template Parameters
-
T Type of items to query over.
- Parameters
-
items Items to query over.
- Returns
- Queryable<T>