ASL
Loading...
Searching...
No Matches
Dic< T > Class Template Reference

Detailed Description

template<class T = String>
class asl::Dic< T >

Dic is a particular case of Map in which keys are strings.

This is a very common case. Dic only needs one template argument: the type of the values

#include <asl/Map.h>

Inherits Map< String, String >.

Additional Inherited Members

Public Member Functions inherited from Map< String, String >
int length () const
 Returns the number of elements in this map.
void clear ()
 Removes all elements.
Map & dup ()
 Detaches this Map from other ones possibly sharing it.
Map clone () const
 Returns an independent copy of this map.
bool has (const String &key) const
 Returns true if an element with key key exists.
const String * find (const String &key) const
 Returns a pointer to the element with key key or a null pointer if it is not found.
Array< String > keys () const
 Returns an array containing all keys of this map.
const String & operator[] (const String &key) const
 Returns a reference to the element with key key, or a static default constructed item if not found.
const String & get (const String &key, const String &def) const
 Returns the element with key key or the value def if key is not found.
bool remove (const String &key)
 Removes the element named key.
void add (const Map &d)
 Adds all elements from dictionary d to this.
Enumerator all () const
 Returns an enumerator for this map.
String join (const String &s1, const String &s2) const
 Joins the contents of a Dic<> into a string, using s1 as element separator (often a comma) and s2 as key-value separator (usually an '=').

The documentation for this class was generated from the following file:
  • Map.h