#include "ycp/YCPBuiltinMap.h"
#include "ycp/YCPMap.h"
#include "ycp/YCPSymbol.h"
#include "ycp/YCPBoolean.h"
#include "ycp/YCPInteger.h"
#include "ycp/YCPCode.h"
#include "ycp/YCPVoid.h"
#include "ycp/StaticDeclaration.h"
#include "ycp/y2log.h"
Functions | |
static YCPValue | m_haskey (const YCPMap &map, const YCPValue &value) |
Check if map has a certain key. | |
static YCPValue | m_filter (const YCPSymbol &key, const YCPSymbol &value, const YCPMap &map, const YCPCode &expr) |
Filter a Map For each key/value pair of the map MAP the expression EXPR is evaluated in a new context, where the variable KEY is assigned to the key and VALUE to the value of the pair. If the expression evaluates to true, the key/value pair is appended to the returned map. | |
static YCPValue | m_mapmap (const YCPSymbol &key, const YCPSymbol &value, const YCPMap &map, const YCPCode &expr) |
Maps an operation onto all key/value pairs of a map. | |
static YCPValue | m_maplist (const YCPSymbol &key, const YCPSymbol &value, const YCPMap &map, const YCPCode &expr) |
Maps an operation onto all elements key/value and create a list Maps an operation onto all elements key/value pairs of a map and thus creates a list. | |
static YCPValue | m_unionmap (const YCPMap &map1, const YCPMap &map2) |
Union of 2 maps Interprets two maps as sets and returns a new map that has all elements of the first map MAP1 and all of the second map MAP2 . If elements have identical keys, values from MAP2 overwrite elements from MAP1 . | |
static YCPValue | m_addmap (const YCPMap &map, const YCPValue &key, const YCPValue &value) |
Add a key/value pair to a map. | |
static YCPValue | m_changemap (YCPMap &map, const YCPValue &key, const YCPValue &value) |
Change element pair in a map DO NOT use this yet. It's for a special requst, not for common use!!! | |
static YCPValue | m_size (const YCPValue &map) |
Size of a map. | |
static YCPValue | m_foreach (const YCPValue &key, const YCPValue &val, const YCPMap &map, const YCPCode &expr) |
Process the content of a map For each key:value pair of the map MAP the expression EXPR is executed in a new context, where the variables KEY is bound to the key and VALUE is bound to the value. The return value of the last execution of exp is the value of the foreach construct. | |
static YCPValue | m_tomap (const YCPValue &v) |
Converts a value to a map. | |
static YCPValue | m_remove (const YCPMap &map, const YCPValue &key) |
Remove key/value pair from a map. | |
Variables | |
StaticDeclaration | static_declarations |
|
Add a key/value pair to a map. add
Adds the key/value pair
|
|
Change element pair in a map DO NOT use this yet. It's for a special requst, not for common use!!! change
Adds the key/value pair
|
|
Filter a Map For each key/value pair of the map filter
|
|
Process the content of a map For each key:value pair of the map foreach
|
|
Check if map has a certain key. haskey
Determines whether the map
|
|
Maps an operation onto all elements key/value and create a list Maps an operation onto all elements key/value pairs of a map and thus creates a list. maplist
For each key/value pair of the map
|
|
Maps an operation onto all key/value pairs of a map. mapmap
Maps an operation onto all key/value pairs of the map The result of each evaluation must be a map with a single entry which will be added to the result map.
|
|
Remove key/value pair from a map. remove
Remove the value with the key
|
|
Size of a map. size
Returns the number of key/value pairs in the map
|
|
Converts a value to a map. tomap
If the value can't be converted to a map, nilmap is returned. Functionality partly replaced with retyping:
|
|
Union of 2 maps Interprets two maps as sets and returns a new map that has all elements of the first map union
|
|
|