#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) |
| static YCPValue | m_filter (const YCPSymbol &key, const YCPSymbol &value, const YCPMap &map, const YCPCode &expr) |
| Check if map has a certain key. | |
| static YCPValue | m_mapmap (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_maplist (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_unionmap (const YCPMap &map1, const YCPMap &map2) |
| 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_addmap (const YCPMap &map, const YCPValue &key, const YCPValue &value) |
Union of 2 maps Interprets two maps as sets and returns a new map that has all elements of the first map MAP1and all of the second map MAP2. If elements have identical keys, values from MAP2 overwrite elements from MAP1. | |
| static YCPValue | m_changemap (YCPMap &map, const YCPValue &key, const YCPValue &value) |
| Add a key/value pair to a map. | |
| static YCPValue | m_size (const YCPValue &map) |
| Change element pair in a map DO NOT use this yet. It's for a special requst, not for common use!!! | |
| static YCPValue | m_foreach (const YCPValue &key, const YCPValue &val, const YCPMap &map, const YCPCode &expr) |
| Size of a map. | |
| static YCPValue | m_tomap (const YCPValue &v) |
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_remove (const YCPMap &map, const YCPValue &key) |
| Converts a value to a map. | |
Variables | |
| StaticDeclaration | static_declarations |
|
||||||||||||||||
|
Union of 2 maps Interprets two maps as sets and returns a new map that has all elements of the first map add
Adds the key/value pair
|
|
||||||||||||||||
|
Add a key/value pair to a map. change
Adds the key/value pair
|
|
||||||||||||||||||||
|
Check if map has a certain key. filter
|
|
||||||||||||||||||||
|
Size of a map. foreach
|
|
||||||||||||
|
haskey
Determines whether the map
|
|
||||||||||||||||||||
|
Maps an operation onto all key/value pairs of a map. maplist
For each key/value pair of the map
|
|
||||||||||||||||||||
|
Filter a Map For each key/value pair of the 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.
|
|
||||||||||||
|
Converts a value to a map. remove
Remove the value with the key
|
|
|
Change element pair in a map DO NOT use this yet. It's for a special requst, not for common use!!! size
Returns the number of key/value pairs in the map
|
|
|
Process the content of a map For each key:value pair of the map tomap
If the value can't be converted to a map, nilmap is returned. Functionality partly replaced with retyping:
|
|
||||||||||||
|
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. union
|
|
|
|
1.4.1