/*------------------------------------------------------------------------------*
 * File Name: Storage.h															*
 * Creation: TD 10-08-2002														*
 * Purpose: Origin C support for info variables in Origin objects				*
 * Copyright (c) OriginLab Corp.2003											*
 * All Rights Reserved															*
 * 																				*
 * Modification Log:															*
 *------------------------------------------------------------------------------*/

#ifndef _STORAGE_H
#define _STORAGE_H

//#include <string.h>

/**+
http://ocwiki.originlab.com/index.php?title=Category:storage_(class)
*/
class storage
{
	
public:
	
	/**+
	http://ocwiki.originlab.com/index.php?title=OriginC:storage-storage
	*/
	storage();
	
	/**+
	http://ocwiki.originlab.com/index.php?title=OriginC:storage-Text
	*/
	string Text;

	/**+
	http://ocwiki.originlab.com/index.php?title=OriginC:storage-GetSection
	*/
	BOOL GetSection(LPCSTR lpcszSecName, TreeNode& trNode);

	/**+
	http://ocwiki.originlab.com/index.php?title=OriginC:storage-SetSection
	*/
	BOOL SetSection(LPCSTR lpcszSecName, TreeNode& trNode);
	
	/**+
	http://ocwiki.originlab.com/index.php?title=OriginC:storage-GetSectionNames
	*/
	BOOL GetSectionNames(vector<string> &vsNames);

	/**+
	http://ocwiki.originlab.com/index.php?title=OriginC:storage-IsValid
	*/
	BOOL IsValid();

	/**+
	http://ocwiki.originlab.com/index.php?title=OriginC:storage-Read
	*/
	bool Read(LPCSTR lpcszFile);

	/**+
	http://ocwiki.originlab.com/index.php?title=OriginC:storage-Write
	*/
	bool Write(LPCSTR lpcszFile);


	/**+
	http://ocwiki.originlab.com/index.php?title=OriginC:storage-DeleteSection
	*/
	BOOL DeleteSection(LPCSTR lpcszSection);
	/**+
	http://ocwiki.originlab.com/index.php?title=OriginC:storage-DeleteValue
	*/
	BOOL DeleteValue(LPCSTR lpcszKey);

	/**+
	http://ocwiki.originlab.com/index.php?title=OriginC:storage-IsAttributes
	*/
	BOOL IsAttributes(DWORD dwAttrib);
	/**+
	http://ocwiki.originlab.com/index.php?title=OriginC:storage-SetAttributes
	*/
	BOOL SetAttributes(DWORD dwAttrib, BOOL bSet = TRUE);

};


#endif //_STORAGE_H
