librime: rime::ConfigItemRef Class Reference

| librime 1.2 Rime Input Method Engine, the core library

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rime::ConfigItemRef Class Referenceabstract

`#include <config_types.h>`

Inheritance diagram for rime::ConfigItemRef:
[legend]
Collaboration diagram for rime::ConfigItemRef:
[legend]

## Public Member Functions
| 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
virtual an< ConfigItem > | GetItem () const =0
virtual void | SetItem (an< ConfigItem > item)=0

## Protected Attributes
ConfigData * | data_

## Constructor & Destructor Documentation

## ◆ ConfigItemRef()

rime::ConfigItemRef::ConfigItemRef | ( | ConfigData * | data | ) |
| inline

## ◆ ~ConfigItemRef()

virtual rime::ConfigItemRef::~ConfigItemRef | ( |  | ) |
| virtualdefault

## Member Function Documentation

## ◆ Append()

bool rime::ConfigItemRef::Append | ( | an< ConfigItem > | item | ) |

## ◆ AsList()

an< ConfigList > rime::ConfigItemRef::AsList | ( |  | ) |

## ◆ AsMap()

an< ConfigMap > rime::ConfigItemRef::AsMap | ( |  | ) |

## ◆ Clear()

void rime::ConfigItemRef::Clear | ( |  | ) |

## ◆ GetItem()

virtual an< ConfigItem > rime::ConfigItemRef::GetItem | ( |  | ) | const
| protectedpure virtual

Implemented in rime::Config, rime::ConfigCowRef< T >, rime::ConfigDataRootRef, rime::ConfigListEntryRef, rime::ConfigMapEntryRef, and rime::ConfigResource.

## ◆ HasKey()

bool rime::ConfigItemRef::HasKey | ( | const string & | key | ) | const

## ◆ IsList()

bool rime::ConfigItemRef::IsList | ( |  | ) | const

## ◆ IsMap()

bool rime::ConfigItemRef::IsMap | ( |  | ) | const

## ◆ IsNull()

bool rime::ConfigItemRef::IsNull | ( |  | ) | const

## ◆ IsValue()

bool rime::ConfigItemRef::IsValue | ( |  | ) | const

## ◆ modified()

bool rime::ConfigItemRef::modified | ( |  | ) | const

## ◆ operator an< ConfigItem >()

rime::ConfigItemRef::operator an< ConfigItem > | ( |  | ) | const
| inline

## ◆ operator*()

an< ConfigItem > rime::ConfigItemRef::operator* | ( |  | ) | const
| inline

## ◆ operator=()

template<class T>

ConfigItemRef & rime::ConfigItemRef::operator= | ( | const T & | x | ) |
| inline

## ◆ operator[]() [1/2]

ConfigMapEntryRef rime::ConfigItemRef::operator[] | ( | const string & | key | ) |
| inline

## ◆ operator[]() [2/2]

ConfigListEntryRef rime::ConfigItemRef::operator[] | ( | size_t | index | ) |
| inline

## ◆ set_modified()

void rime::ConfigItemRef::set_modified | ( |  | ) |

## ◆ SetItem()

virtual void rime::ConfigItemRef::SetItem | ( | an< ConfigItem > | item | ) |
| protectedpure virtual

Implemented in rime::Config, rime::ConfigCowRef< T >, rime::ConfigDataRootRef, rime::ConfigListEntryRef, rime::ConfigMapEntryRef, and rime::ConfigResource.

## ◆ size()

size_t rime::ConfigItemRef::size | ( |  | ) | const

## ◆ ToBool()

bool rime::ConfigItemRef::ToBool | ( |  | ) | const

## ◆ ToDouble()

double rime::ConfigItemRef::ToDouble | ( |  | ) | const

## ◆ ToInt()

int rime::ConfigItemRef::ToInt | ( |  | ) | const

## ◆ ToString()

string rime::ConfigItemRef::ToString | ( |  | ) | const

## Member Data Documentation

## ◆ data_

ConfigData* rime::ConfigItemRef::data_
| protected

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

- config_types.h
- config_types.cc