1 // SSNameObject.h: interface for the SSNameObject class.
3 //////////////////////////////////////////////////////////////////////
5 #if !defined(AFX_SSNAMEOBJECT_H__8116FB34_17A5_40BB_829F_28413D2A00DA__INCLUDED_)
6 #define AFX_SSNAMEOBJECT_H__8116FB34_17A5_40BB_829F_28413D2A00DA__INCLUDED_
10 #endif // _MSC_VER > 1000
16 //------------------------------------------------------------------------------
17 class SSNameObject
: public SSObject
20 typedef std::map
<short, std::string
>::const_iterator const_iterator
;
21 typedef std::map
<short, std::string
>::size_type size_type
;
23 SSNameObject (SSRecordPtr pRecord
);
25 const_iterator
begin () const { return m_NamesMap
.begin (); }
26 const_iterator
end () const { return m_NamesMap
.end (); }
27 size_type
size () const { return m_NamesMap
.size (); }
29 std::string
GetName (short id
);
31 virtual void Accept (ISSObjectVisitor
& rVisitor
, const ISSContext
* pCtx
= NULL
) const { rVisitor
.Apply (*this, pCtx
); }
33 void ToXml (XMLNode
* pParent
) const;
34 void Dump (std::ostream
& os
) const;
37 void Init (SSRecordPtr pRecord
);
39 std::map
<short, std::string
> m_NamesMap
;
42 //------------------------------------------------------------------------------
56 void SetFile (SSNamesCacheFile
* pFile
)
61 std::string
GetName (short flag
, long offset
, int cp
=0)
66 SSRecordPtr pRecord
= m_pFile
->GetRecord (offset
);
67 SSNameObject
names (pRecord
);
68 return names
.GetName (flag
<< 3 | 2);
72 SSNamesCacheFile
* m_pFile
;
76 #endif // !defined(AFX_SSNAMEOBJECT_H__8116FB34_17A5_40BB_829F_28413D2A00DA__INCLUDED_)