-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathHdfObj.cpp
More file actions
executable file
·79 lines (64 loc) · 1.27 KB
/
Copy pathHdfObj.cpp
File metadata and controls
executable file
·79 lines (64 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// HdfObj.cpp: implementation of the CHObject class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "HDFPlugin.h"
#include "HdfObj.h"
#include "HdfObjFileFormat.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CHObject::CHObject(CFileFormat* file, LPCTSTR name, LPCTSTR path)
{
m_pFile = file;
strcpy(m_pName, name);
strcpy(m_pPath, path);
m_nObjectID = 0;
m_pAttrList = NULL;
if (m_pPath)
{
strcpy(m_pFullName, m_pPath);
strcat(m_pFullName, name);
}
}
CHObject::~CHObject()
{
if (m_pFile)
{
delete m_pFile;
m_pFile = 0;
}
}
CFileFormat* CHObject::GetFile()
{
return m_pFile;
}
LPCTSTR CHObject::GetName()
{
return m_pName;
}
LPCTSTR CHObject::GetFullName()
{
return m_pFullName;
}
LPCTSTR CHObject::GetPath()
{
return m_pPath;
}
void CHObject::SetName(LPCTSTR name)
{
strcpy(m_pName, name);
}
void CHObject::SetPath(LPCTSTR path)
{
strcpy(m_pPath, path);
}
int CHObject::GetType()
{
return m_nType;
}