librime: rime::ConfigData Class Reference

| librime 1.2 Rime Input Method Engine, the core library

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
rime::ConfigData Class Reference

`#include <config_data.h>`

Collaboration diagram for rime::ConfigData:
[legend]

## Public Member Functions
| ConfigData ()=default
| ~ConfigData ()
bool | Save ()
bool | LoadFromStream (std::istream &stream)
bool | SaveToStream (std::ostream &stream)
bool | LoadFromFile (const path &file_path, ConfigCompiler *compiler)
bool | SaveToFile (const path &file_path)
bool | TraverseWrite (const string &path, an< ConfigItem > item)
an< ConfigItem > | Traverse (const string &path)
const path & | file_path () const
bool | modified () const
void | set_modified ()
void | set_auto_save (bool auto_save)

## Static Public Member Functions
static vector< string > | SplitPath (const string &path)
static string | JoinPath (const vector< string > &keys)
static bool | IsListItemReference (const string &key)
static string | FormatListIndex (size_t index)
static size_t | ResolveListIndex (an< ConfigItem > list, const string &key, bool read_only=false)

## Public Attributes
an< ConfigItem > | root

## Protected Attributes
path | file_path_
bool | modified_ = false
bool | auto_save_ = false

## Constructor & Destructor Documentation

## ◆ ConfigData()

rime::ConfigData::ConfigData | ( |  | ) |
| default

## ◆ ~ConfigData()

rime::ConfigData::~ConfigData | ( |  | ) |

## Member Function Documentation

## ◆ file_path()

const path & rime::ConfigData::file_path | ( |  | ) | const
| inline

## ◆ FormatListIndex()

string rime::ConfigData::FormatListIndex | ( | size_t | index | ) |
| static

## ◆ IsListItemReference()

bool rime::ConfigData::IsListItemReference | ( | const string & | key | ) |
| static

## ◆ JoinPath()

string rime::ConfigData::JoinPath | ( | const vector< string > & | keys | ) |
| static

## ◆ LoadFromFile()

bool rime::ConfigData::LoadFromFile | ( | const path & | file_path,
|  | ConfigCompiler * | compiler )

## ◆ LoadFromStream()

bool rime::ConfigData::LoadFromStream | ( | std::istream & | stream | ) |

## ◆ modified()

bool rime::ConfigData::modified | ( |  | ) | const
| inline

## ◆ ResolveListIndex()

size_t rime::ConfigData::ResolveListIndex | ( | an< ConfigItem > | list,
|  | const string & | key,
|  | bool | read_only = false )
| static

## ◆ Save()

bool rime::ConfigData::Save | ( |  | ) |

## ◆ SaveToFile()

bool rime::ConfigData::SaveToFile | ( | const path & | file_path | ) |

## ◆ SaveToStream()

bool rime::ConfigData::SaveToStream | ( | std::ostream & | stream | ) |

## ◆ set_auto_save()

void rime::ConfigData::set_auto_save | ( | bool | auto_save | ) |
| inline

## ◆ set_modified()

void rime::ConfigData::set_modified | ( |  | ) |
| inline

## ◆ SplitPath()

vector< string > rime::ConfigData::SplitPath | ( | const string & | path | ) |
| static

## ◆ Traverse()

an< ConfigItem > rime::ConfigData::Traverse | ( | const string & | path | ) |

## ◆ TraverseWrite()

bool rime::ConfigData::TraverseWrite | ( | const string & | path,
|  | an< ConfigItem > | item )

## Member Data Documentation

## ◆ auto_save_

bool rime::ConfigData::auto_save_ = false
| protected

## ◆ file_path_

path rime::ConfigData::file_path_
| protected

## ◆ modified_

bool rime::ConfigData::modified_ = false
| protected

## ◆ root

an<ConfigItem> rime::ConfigData::root

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

- config_data.h
- config_data.cc