librime: rime::ConfigCowRef< T > Class Template Reference

| librime 1.2 Rime Input Method Engine, the core library

Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
rime::ConfigCowRef< T > Class Template Reference

`#include <config_cow_ref.h>`

Inheritance diagram for rime::ConfigCowRef< T >:
[legend]
Collaboration diagram for rime::ConfigCowRef< T >:
[legend]

## Public Member Functions
| ConfigCowRef (an< ConfigItemRef > parent, string key)
an< ConfigItem > | GetItem () const override
void | SetItem (an< ConfigItem > item) override
Public Member Functions inherited from rime::ConfigItemRef
| ConfigItemRef (ConfigData *data)
virtual | ~ConfigItemRef ()=default
| operator an< ConfigItem > () const
an< ConfigItem > | operator* () const
template<class T>
ConfigItemRef & | operator= (const T &x)
ConfigListEntryRef | operator[] (size_t index)
ConfigMapEntryRef | operator[] (const string &key)
RIME_DLL bool | IsNull () const
bool | IsValue () const
RIME_DLL bool | IsList () const
bool | IsMap () const
RIME_DLL bool | ToBool () const
RIME_DLL int | ToInt () const
double | ToDouble () const
RIME_DLL string | ToString () const
RIME_DLL an< ConfigList > | AsList ()
RIME_DLL an< ConfigMap > | AsMap ()
RIME_DLL void | Clear ()
RIME_DLL bool | Append (an< ConfigItem > item)
RIME_DLL size_t | size () const
RIME_DLL bool | HasKey (const string &key) const
RIME_DLL bool | modified () const
RIME_DLL void | set_modified ()

## Protected Member Functions
an< ConfigItem > | Read (const an< ConfigMap > &map, const string &key)
void | Write (const an< ConfigMap > &map, const string &key, an< ConfigItem > value)
an< ConfigItem > | Read (const an< ConfigList > &list, const string &key)
void | Write (const an< ConfigList > &list, const string &key, an< ConfigItem > value)

## Static Protected Member Functions
static an< T > | CopyOnWrite (const an< T > &container, const string &key)
static an< ConfigItem > | Read (const an< T > &container, const string &key)
static void | Write (const an< T > &container, const string &key, an< ConfigItem > value)

## Protected Attributes
an< ConfigItemRef > | parent_
string | key_
bool | copied_ = false
Protected Attributes inherited from rime::ConfigItemRef
ConfigData * | data_

## Constructor & Destructor Documentation

## ◆ ConfigCowRef()

template<class T>

rime::ConfigCowRef< T >::ConfigCowRef | ( | an< ConfigItemRef > | parent,
|  | string | key )
| inline

## Member Function Documentation

## ◆ CopyOnWrite()

template<class T>

an< T > rime::ConfigCowRef< T >::CopyOnWrite | ( | const an< T > & | container,
|  | const string & | key )
| inlinestaticprotected

## ◆ GetItem()

template<class T>

an< ConfigItem > rime::ConfigCowRef< T >::GetItem | ( |  | ) | const
| inlineoverridevirtual

Implements rime::ConfigItemRef.

## ◆ Read() [1/3]

an< ConfigItem > rime::ConfigCowRef< ConfigList >::Read | ( | const an< ConfigList > & | list,
|  | const string & | key )
| inlineprotected

## ◆ Read() [2/3]

an< ConfigItem > rime::ConfigCowRef< ConfigMap >::Read | ( | const an< ConfigMap > & | map,
|  | const string & | key )
| inlineprotected

## ◆ Read() [3/3]

template<class T>

an< ConfigItem > rime::ConfigCowRef< T >::Read | ( | const an< T > & | container,
|  | const string & | key )
| staticprotected

## ◆ SetItem()

template<class T>

void rime::ConfigCowRef< T >::SetItem | ( | an< ConfigItem > | item | ) |
| inlineoverridevirtual

Implements rime::ConfigItemRef.

## ◆ Write() [1/3]

void rime::ConfigCowRef< ConfigList >::Write | ( | const an< ConfigList > & | list,
|  | const string & | key,
|  | an< ConfigItem > | value )
| inlineprotected

## ◆ Write() [2/3]

void rime::ConfigCowRef< ConfigMap >::Write | ( | const an< ConfigMap > & | map,
|  | const string & | key,
|  | an< ConfigItem > | value )
| inlineprotected

## ◆ Write() [3/3]

template<class T>

void rime::ConfigCowRef< T >::Write | ( | const an< T > & | container,
|  | const string & | key,
|  | an< ConfigItem > | value )
| staticprotected

## Member Data Documentation

## ◆ copied_

template<class T>

bool rime::ConfigCowRef< T >::copied_ = false
| protected

## ◆ key_

template<class T>

string rime::ConfigCowRef< T >::key_
| protected

## ◆ parent_

template<class T>

an<ConfigItemRef> rime::ConfigCowRef< T >::parent_
| protected

The documentation for this class was generated from the following file:

- config_cow_ref.h