Public Member Functions | Public Attributes

ivd_Product Class Reference
[Common, basic classes, functions and types]

#include <ivd_prod.h>

List of all members.

Public Member Functions

 ivd_Product ()
 ~ivd_Product ()

Public Attributes

string m_name
string m_nameShort
string m_desc
string m_companyName
string m_copyright
string m_copyright2
string m_companyShort
string m_companyPath
string m_URL
string m_nameShortLC

Detailed Description

Definition at line 34 of file ivd_prod.h.


Constructor & Destructor Documentation

ivd_Product::ivd_Product (  ) 

Definition at line 112 of file ivd_prod.cpp.

References getConfigPath(), getline(), m_companyName, m_companyPath, m_companyShort, m_copyright, m_copyright2, m_desc, m_name, m_nameShort, m_nameShortLC, m_URL, and prod_name_d.

                         :
    m_name("INFINISTORE VirtualDisk"),
    m_nameShort("IVD"),
    m_desc("INFINISTORE VirtualDisk HSM application."),
    m_companyName("GRAU Data Storage"),
    m_copyright("Copyright (C) 2002-2004 GRAU Data Storage"),
    m_copyright2(),
    m_companyShort("GDS"),
    m_companyPath("GDS"),
    m_URL("www.graudatastorage.de"),
    m_nameShortLC("ivd")
{
    string configFileName = getConfigPath();
    configFileName.append(prod_name_d);
    ifstream cfg(configFileName.c_str());

    // Did open succeed?
    if (!cfg) {
        return;
    };

    if (cfg.fail() != true) {
        try {
            getline(cfg, m_name);
            getline(cfg, m_nameShort);
            getline(cfg, m_desc);
            getline(cfg, m_companyName);
            getline(cfg, m_copyright);
            getline(cfg, m_copyright2);
            getline(cfg, m_companyShort);
            // Used in registry and installation path
            getline(cfg, m_companyPath);
            // Used in RPM package info
            getline(cfg, m_URL);
            // prefix for commands and linux default installation directories
            m_nameShortLC.erase();
            for (size_t i=0; i<m_nameShort.size(); i++) {
                m_nameShortLC.push_back(tolower(m_nameShort[i]));
            }
            // transform doesn't comile w/ g++:
            // transform(m_nameShort.begin(), m_nameShort.end(),
            //           m_nameShortLC.begin(), tolower);
        } catch (...) {
            // Wrong prod.cfg format. Leave default values.
        }
    } else {
        // File prod.cfg not found. Leave default values.
    }
    cfg.close();
}

Here is the call graph for this function:

ivd_Product::~ivd_Product (  ) 

Definition at line 163 of file ivd_prod.cpp.

{
}


Member Data Documentation

Definition at line 43 of file ivd_prod.h.

Referenced by ivd_Product().

Definition at line 47 of file ivd_prod.h.

Referenced by ivd_Product().

Definition at line 46 of file ivd_prod.h.

Referenced by ivd_Product().

Definition at line 44 of file ivd_prod.h.

Referenced by ivd_ParseCmnArgs(), ivd_Product(), and cfg_CliBase::Refresh().

Definition at line 45 of file ivd_prod.h.

Referenced by ivd_ParseCmnArgs(), ivd_Product(), and cfg_CliBase::Refresh().

Definition at line 42 of file ivd_prod.h.

Referenced by ivd_Product().

Definition at line 40 of file ivd_prod.h.

Referenced by ivd_ParseCmnArgs(), ivd_Product(), and cfg_CliBase::Refresh().

Definition at line 48 of file ivd_prod.h.

Referenced by ivd_Product().


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