storage

 

Contents

Name

storage

Remark

Origin allows save binary type (TreeNode type in Origin C) or INI type (INIFile type in Origin C) storage into Origin Object. Origin Object can be any Origin C object that it class devided from OriginObject class. For example, WorksheetPage, Column, Folder, GraphPage, GraphLayer, DataPlot, or Project.

OriginObject:: GetStorageNames is used to get all storage names from the object, and OriginObject::GetStorage is used to get the storage from this object by name.

For binary type storage, suggest directly use OriginObject::GetBinaryStorage to get, OriginObject::PutBinaryStorage to set.

Hierarchy

Examples

EX1

void storage_Storage_ex1()
{
        Page pg = Project.Pages();
        if(pg == NULL)
           return;
        string strStorage = "Test";
        string strSection = "Params";
        Tree trTemp;
        storage st;
        st = pg.GetStorage(strStorage);
        if(st)
        {
            if(st.GetSection(strSection, trTemp))
                out_tree(trTemp);
        }
}

header to Include

origin.h

Reference

Members

Name Brief Example
DeleteSection Deletes a section Examples
DeleteValue Deletes a value Examples
GetSection Copy a storage section into a treenode Examples
GetSectionNames Get names of all the sections in this storage Examples
IsAttributes Determines if one of the attribute bits is set to the storage object Examples
IsValid Checks Validity of the Storage object. Examples
Read Load contents from file into storage class. They can be retrieved by GetTxt method. Examples
SetAttributes Sets/clears one of the attribute bits to the storage object Examples
SetSection Copy a TreeNode branch into a storage section. Section is created if not already present Examples
storage Constructor Examples
Write Write contents of a storage class into a file. Examples

Property

Name Brief Example
Text Examples