-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathopennurbs_3dm_properties.h
142 lines (112 loc) · 3.92 KB
/
opennurbs_3dm_properties.h
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/* $NoKeywords: $ */
/*
//
// Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved.
// OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
// McNeel & Associates.
//
// THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
// ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
// MERCHANTABILITY ARE HEREBY DISCLAIMED.
//
// For complete openNURBS copyright information see <http://www.opennurbs.org>.
//
////////////////////////////////////////////////////////////////
*/
#if !defined(OPENNURBS_3DM_PROPERTIES_INC_)
#define OPENNURBS_3DM_PROPERTIES_INC_
//////////////////////////////////////////////////////////////////////////////////////////
class ON_CLASS ON_3dmRevisionHistory
{
public:
ON_3dmRevisionHistory();
~ON_3dmRevisionHistory();
// C++ default operator= and copy constructor work fine.
void Default();
ON_BOOL32 IsValid() const;
int NewRevision(); // returns updated revision count
ON_BOOL32 Read( ON_BinaryArchive& );
ON_BOOL32 Write( ON_BinaryArchive& ) const;
void Dump( ON_TextLog& ) const;
/*
Returns:
true
if m_create_time is >= January 1, 1970
*/
bool CreateTimeIsSet() const;
/*
Returns:
true
if m_last_edit_time is >= January 1, 1970
*/
bool LastEditedTimeIsSet() const;
ON_wString m_sCreatedBy;
ON_wString m_sLastEditedBy;
struct tm m_create_time; // UCT create time
struct tm m_last_edit_time; // UCT las edited time
int m_revision_count;
};
//////////////////////////////////////////////////////////////////////////////////////////
class ON_CLASS ON_3dmNotes
{
public:
ON_3dmNotes();
ON_3dmNotes( const ON_3dmNotes& );
~ON_3dmNotes();
ON_3dmNotes& operator=(const ON_3dmNotes&);
void Default();
ON_BOOL32 IsValid() const;
ON_BOOL32 Read( ON_BinaryArchive& );
ON_BOOL32 Write( ON_BinaryArchive& ) const;
void Dump(ON_TextLog&) const;
////////////////////////////////////////////////////////////////
//
// Interface - this information is serialized. Applications
// may want to derive a runtime class that has additional
// window and font information.
ON_wString m_notes; // UNICODE
ON_BOOL32 m_bVisible; // true if notes window is showing
ON_BOOL32 m_bHTML; // true if notes are in HTML
// last window position
int m_window_left;
int m_window_top;
int m_window_right;
int m_window_bottom;
};
//////////////////////////////////////////////////////////////////////////////////////////
class ON_CLASS ON_3dmApplication
{
// application that created the 3dm file
public:
ON_3dmApplication();
ON_3dmApplication( const ON_3dmApplication& );
~ON_3dmApplication();
ON_3dmApplication& operator=(const ON_3dmApplication&);
void Default();
ON_BOOL32 IsValid() const;
ON_BOOL32 Read( ON_BinaryArchive& );
ON_BOOL32 Write( ON_BinaryArchive& ) const;
void Dump( ON_TextLog& ) const;
ON_wString m_application_name; // short name like "Rhino 2.0"
ON_wString m_application_URL; // URL
ON_wString m_application_details; // whatever you want
};
//////////////////////////////////////////////////////////////////////////////////////////
class ON_CLASS ON_3dmProperties
{
public:
ON_3dmProperties();
~ON_3dmProperties();
ON_3dmProperties(const ON_3dmProperties&);
ON_3dmProperties& operator=(const ON_3dmProperties&);
void Default();
ON_BOOL32 Read(ON_BinaryArchive&);
ON_BOOL32 Write(ON_BinaryArchive&) const;
void Dump( ON_TextLog& ) const;
ON_3dmRevisionHistory m_RevisionHistory;
ON_3dmNotes m_Notes;
ON_WindowsBitmap m_PreviewImage; // preview image of model
ON_3dmApplication m_Application; // application that created 3DM file
};
//////////////////////////////////////////////////////////////////////////////////////////
#endif