KisaragiLibrary
 
読み取り中…
検索中…
一致する文字列を見つけられません
Kisaragi_Lib::Resource::ResourceFind クラス

t@CpXKeyL\[X݂邩T. [詳解]

#include <Kisaragi_Resource.h>

公開メンバ関数

bool IsEmptyKey (string _key)
 _key݂邩mF.
 
bool IsEmptyPass (string _pass)
 _pass݂邩.
 
Result Add (string _key, string _pass)
 vf̒ljs.ds.
 
Result Remove (string _key)
 vf̍폜s.
 
string KeyToPass (const string _key)
 KeypXɕϊ.
 
string PassToKey (const string _pass)
 pXKeyɕϊ.
 
void Reset ()
 

非公開変数類

std::map< string, stringkeyToPass
 
std::map< string, stringpassToKey
 

詳解

t@CpXKeyL\[X݂邩T.

関数詳解

◆ IsEmptyKey()

bool Kisaragi_Lib::Resource::ResourceFind::IsEmptyKey ( string _key)
inline

_key݂邩mF.

引数
_keykey
戻り値
true = ݂Ȃ. false = ݂
48 {
49 bool empty = true;
50 if (keyToPass.end() != keyToPass.find(_key))
51 {
52 empty = false;
53 }
54 return empty;
55 }
std::map< string, string > keyToPass
Definition Kisaragi_Resource.h:37

参照元 Add(), Remove().

◆ IsEmptyPass()

bool Kisaragi_Lib::Resource::ResourceFind::IsEmptyPass ( string _pass)
inline

_pass݂邩.

引数
_passpX
戻り値
true = ݂Ȃ. false = ݂
63 {
64 bool empty = true;
65 if (passToKey.end() != passToKey.find(_pass))
66 {
67 empty = false;
68 }
69 return empty;
70 }
std::map< string, string > passToKey
Definition Kisaragi_Resource.h:39

参照元 Add().

◆ Add()

Result Kisaragi_Lib::Resource::ResourceFind::Add ( string _key,
string _pass )
inline

vf̒ljs.ds.

引数
_keyljKey
_passljPass
戻り値
ljǂ
79 {
80 //_key݂ȂA
81 if (!IsEmptyKey(_key))
82 {
83 return FAIL;
84 }
85
86 //_passdȂA
87 if (!IsEmptyPass(_pass))
88 {
89 return FAIL;
90 }
91
92 //mapɒlj.
93 keyToPass.emplace(_key, _pass);
94 passToKey.emplace(_pass, _key);
95
96 return SUCCESS;
97 }
@ FAIL
Definition Const.h:9
@ SUCCESS
Definition Const.h:10
bool IsEmptyKey(string _key)
_key݂邩mF.
Definition Kisaragi_Resource.h:47
bool IsEmptyPass(string _pass)
_pass݂邩.
Definition Kisaragi_Resource.h:62

◆ Remove()

Result Kisaragi_Lib::Resource::ResourceFind::Remove ( string _key)
inline

vf̍폜s.

引数
_key폜vfKey
戻り値
폜̉”
105 {
106 //key݂ȂȂ
107 if (!IsEmptyKey(_key))
108 {
109 return FAIL;
110 }
111
112 passToKey.erase(KeyToPass(_key));
113 keyToPass.erase(_key);
114 return SUCCESS;
115 }
string KeyToPass(const string _key)
KeypXɕϊ.
Definition Kisaragi_Resource.h:122

◆ KeyToPass()

string Kisaragi_Lib::Resource::ResourceFind::KeyToPass ( const string _key)
inline

KeypXɕϊ.

引数
_keyϊkey
戻り値
_keyɑΉpX
123 {
124 return keyToPass[_key];
125 }

参照元 Remove().

◆ PassToKey()

string Kisaragi_Lib::Resource::ResourceFind::PassToKey ( const string _pass)
inline

pXKeyɕϊ.

引数
_passϊpX
戻り値
_passɑΉkey
133 {
134 return passToKey[_pass];
135 }

◆ Reset()

void Kisaragi_Lib::Resource::ResourceFind::Reset ( )
inline
138 {
139 keyToPass.clear();
140 passToKey.clear();
141 }

メンバ詳解

◆ keyToPass

std::map<string, string> Kisaragi_Lib::Resource::ResourceFind::keyToPass
private

◆ passToKey

std::map<string, string> Kisaragi_Lib::Resource::ResourceFind::passToKey
private

このクラス詳解は次のファイルから抽出されました: