FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
November 01, 2005

C++ Smart Pointers & Tags

(Page 6 of 8)

November, 2005: C++ Smart Pointers & Tags

Listing 1


class CJobDef
{
    friend CArchive & operator >> (CArchive &ar, CJobDef *def)
    {
        ar >> def->command;
    }
    friend CArchive & operator << (CArchive &ar, CjobDef *def)
    {
        ar << def->command;
    }
private:
    std::string command;
};
class CJobInst
{
    friend CArchive & operator >> (CArchive &ar, CJobInst *inst)
    {
        inst->m_def = new CJobDef;
        ar >> inst->m_def;
    }
    friend CArchive & operator << (CArchive &ar, const CJobInst *inst)
    {
        ar << inst->m_def;
    }
private:
    CJobDef *m_def;
};

Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK