Point Cloud Library (PCL)  1.14.1-dev
opennurbs_3dm_properties.h
1 /* $NoKeywords: $ */
2 /*
3 //
4 // Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved.
5 // OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
6 // McNeel & Associates.
7 //
8 // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
9 // ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
10 // MERCHANTABILITY ARE HEREBY DISCLAIMED.
11 //
12 // For complete openNURBS copyright information see <http://www.opennurbs.org>.
13 //
14 ////////////////////////////////////////////////////////////////
15 */
16 
17 #if !defined(OPENNURBS_3DM_PROPERTIES_INC_)
18 #define OPENNURBS_3DM_PROPERTIES_INC_
19 
20 //////////////////////////////////////////////////////////////////////////////////////////
21 
22 class ON_CLASS ON_3dmRevisionHistory
23 {
24 public:
27  // C++ default operator= and copy constructor work fine.
28 
29  void Default();
30  ON_BOOL32 IsValid() const;
31  int NewRevision(); // returns updated revision count
32 
33  ON_BOOL32 Read( ON_BinaryArchive& );
34  ON_BOOL32 Write( ON_BinaryArchive& ) const;
35 
36  void Dump( ON_TextLog& ) const;
37 
38  /*
39  Returns:
40  true
41  if m_create_time is >= January 1, 1970
42  */
43  bool CreateTimeIsSet() const;
44 
45  /*
46  Returns:
47  true
48  if m_last_edit_time is >= January 1, 1970
49  */
50  bool LastEditedTimeIsSet() const;
51 
53  ON_wString m_sLastEditedBy;
54  struct tm m_create_time; // UCT create time
55  struct tm m_last_edit_time; // UCT las edited time
57 };
58 
59 //////////////////////////////////////////////////////////////////////////////////////////
60 
61 class ON_CLASS ON_3dmNotes
62 {
63 public:
68 
69  void Default();
70  ON_BOOL32 IsValid() const;
71 
72  ON_BOOL32 Read( ON_BinaryArchive& );
73  ON_BOOL32 Write( ON_BinaryArchive& ) const;
74 
75  void Dump(ON_TextLog&) const;
76 
77  ////////////////////////////////////////////////////////////////
78  //
79  // Interface - this information is serialized. Applications
80  // may want to derive a runtime class that has additional
81  // window and font information.
82  ON_wString m_notes; // UNICODE
83  ON_BOOL32 m_bVisible; // true if notes window is showing
84  ON_BOOL32 m_bHTML; // true if notes are in HTML
85 
86  // last window position
91 };
92 
93 //////////////////////////////////////////////////////////////////////////////////////////
94 
95 class ON_CLASS ON_3dmApplication
96 {
97  // application that created the 3dm file
98 public:
103 
104  void Default();
105  ON_BOOL32 IsValid() const;
106 
107  ON_BOOL32 Read( ON_BinaryArchive& );
108  ON_BOOL32 Write( ON_BinaryArchive& ) const;
109 
110  void Dump( ON_TextLog& ) const;
111 
112  ON_wString m_application_name; // short name like "Rhino 2.0"
114  ON_wString m_application_details; // whatever you want
115 };
116 
117 //////////////////////////////////////////////////////////////////////////////////////////
118 
119 class ON_CLASS ON_3dmProperties
120 {
121 public:
126 
127  void Default();
128 
129  ON_BOOL32 Read(ON_BinaryArchive&);
130  ON_BOOL32 Write(ON_BinaryArchive&) const;
131 
132  void Dump( ON_TextLog& ) const;
133 
136  ON_WindowsBitmap m_PreviewImage; // preview image of model
137  ON_3dmApplication m_Application; // application that created 3DM file
138 };
139 
140 //////////////////////////////////////////////////////////////////////////////////////////
141 
142 #endif
ON_3dmApplication & operator=(const ON_3dmApplication &)
ON_BOOL32 IsValid() const
ON_BOOL32 Read(ON_BinaryArchive &)
ON_BOOL32 Write(ON_BinaryArchive &) const
void Dump(ON_TextLog &) const
ON_3dmApplication(const ON_3dmApplication &)
ON_3dmNotes(const ON_3dmNotes &)
void Default()
ON_BOOL32 Read(ON_BinaryArchive &)
ON_3dmNotes & operator=(const ON_3dmNotes &)
ON_BOOL32 IsValid() const
ON_BOOL32 Write(ON_BinaryArchive &) const
void Dump(ON_TextLog &) const
void Dump(ON_TextLog &) const
ON_BOOL32 Read(ON_BinaryArchive &)
ON_3dmProperties & operator=(const ON_3dmProperties &)
ON_3dmProperties(const ON_3dmProperties &)
ON_WindowsBitmap m_PreviewImage
ON_3dmRevisionHistory m_RevisionHistory
ON_3dmApplication m_Application
ON_BOOL32 Write(ON_BinaryArchive &) const
bool CreateTimeIsSet() const
ON_BOOL32 Write(ON_BinaryArchive &) const
bool LastEditedTimeIsSet() const
ON_BOOL32 Read(ON_BinaryArchive &)
void Dump(ON_TextLog &) const
ON_BOOL32 IsValid() const