ulib  1.0
S.W. Lee's essential C++ library
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
Public Member Functions | List of all members
ulib::CUConfigFile Class Reference

Configure 클래스 More...

#include <uconfigfile.h>

Public Member Functions

 CUConfigFile ()
 생성자
 CUConfigFile (char fn[])
 생성자
 ~CUConfigFile ()
 소멸자
bool Load (CUString arg_filename)
 파일을 읽어 항목별로 나누고 메모리에 로드함.
bool IsLoad ()
 파일을 열었는지 검사
bool GetValue (CUString key, CUString &ret_value)
 key에 해당하는 value를 구함.
bool SetValue (CUString key, CUString value)
 key에 value를 저장
bool HaveValue (CUString key)
 key에 해당하는 value가 존재하는지 검사
bool CheckValue (CUString key)
void Print (FILE *fp)
void GetKeyList (CUStringList &key)

Detailed Description

Configure 클래스

Date
06.07.19
Author
이승욱
Warning
???
Todo:
???
Bug:
???
Note
윈도우즈의 ini파일과 같이 환경설정을 저장하는 파일을 처리하는 클래스.

Constructor & Destructor Documentation

ulib::CUConfigFile::CUConfigFile ( )

생성자

See Also
~CUConfigFile()
ulib::CUConfigFile::CUConfigFile ( char  fn[])

생성자

See Also
~CUConfigFile()

References Load().

ulib::CUConfigFile::~CUConfigFile ( )

소멸자

Note
See Also
CUString()

Member Function Documentation

bool ulib::CUConfigFile::CheckValue ( CUString  key)
void ulib::CUConfigFile::GetKeyList ( CUStringList key)
bool ulib::CUConfigFile::GetValue ( CUString  key,
CUString ret_value 
)

key에 해당하는 value를 구함.

Parameters
key찾고자 하는 key
ret_valuevalue를 저장할 변수
Returns
값을 찾으면 저장 후 true를 반환, 못찾으면 false를 반환
See Also
SetValue()

References ulib::CUString::GetStr(), and IsLoad().

bool ulib::CUConfigFile::HaveValue ( CUString  key)

key에 해당하는 value가 존재하는지 검사

Parameters
key찾고자 하는 key
Returns
key가 존재하면 true를 그렇지 않으면 false를 반환
See Also
SetValue(), GetValue()

References ulib::CUString::GetStr(), and IsLoad().

Referenced by CheckValue().

bool ulib::CUConfigFile::IsLoad ( )

파일을 열었는지 검사

Returns
파일이 열려 있으면 true를 그렇지 않으면 false를 반환
See Also
Load()

References ulib::CUTextFile::IsOpen().

Referenced by GetValue(), HaveValue(), and SetValue().

bool ulib::CUConfigFile::Load ( CUString  arg_filename)

파일을 읽어 항목별로 나누고 메모리에 로드함.

Parameters
arg_filename읽을 설정 파일
Returns
설정 파일을 읽어 메모리에 로드하면 true를, 그렇지 않으면 false를 반환
Note
가장 먼저 나오는 = 문자를 기준으로 key, value로 나눔. key = value, "key" = "value", 'key' = 'value' 형식만 지원
See Also

References ulib::CUString::Find(), ulib::CUString::GetAt(), ulib::CUString::GetStr(), ulib::CUString::IsEmpty(), ulib::CUTextFile::IsOpen(), ulib::CUString::Left(), ulib::CUString::Mid(), ulib::CUTextFile::MoveToStart(), ulib::CUTextFile::OpenFile(), ulib::CUTextFile::ReadLine(), SetValue(), and ulib::CUString::Trim().

Referenced by CUConfigFile().

void ulib::CUConfigFile::Print ( FILE *  fp)
bool ulib::CUConfigFile::SetValue ( CUString  key,
CUString  value 
)

key에 value를 저장

Parameters
key저장하고자 하는 key
value저장하고자 하는 value
Returns
추가하는 데 성공하면 true, 실패하면 false를 반환 추가하려는 key가 이미 있다면 false를 반환
See Also
GetValue()

References ulib::CUString::GetStr(), and IsLoad().

Referenced by Load().


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