Loading...
Searching...
No Matches
opennurbs_3dm_properties.h
/* $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
ON_3dmApplication
Definition opennurbs_3dm_properties.h:96
ON_3dmApplication::operator=
ON_3dmApplication & operator=(const ON_3dmApplication &)
ON_3dmApplication::IsValid
ON_BOOL32 IsValid() const
ON_3dmApplication::Read
ON_BOOL32 Read(ON_BinaryArchive &)
ON_3dmApplication::Write
ON_BOOL32 Write(ON_BinaryArchive &) const
ON_3dmApplication::Dump
void Dump(ON_TextLog &) const
ON_3dmApplication::m_application_URL
ON_wString m_application_URL
Definition opennurbs_3dm_properties.h:113
ON_3dmApplication::Default
void Default()
ON_3dmApplication::m_application_name
ON_wString m_application_name
Definition opennurbs_3dm_properties.h:112
ON_3dmApplication::ON_3dmApplication
ON_3dmApplication()
ON_3dmApplication::m_application_details
ON_wString m_application_details
Definition opennurbs_3dm_properties.h:114
ON_3dmApplication::ON_3dmApplication
ON_3dmApplication(const ON_3dmApplication &)
ON_3dmApplication::~ON_3dmApplication
~ON_3dmApplication()
ON_3dmNotes
Definition opennurbs_3dm_properties.h:62
ON_3dmNotes::operator=
ON_3dmNotes & operator=(const ON_3dmNotes &)
ON_3dmNotes::ON_3dmNotes
ON_3dmNotes()
ON_3dmNotes::ON_3dmNotes
ON_3dmNotes(const ON_3dmNotes &)
ON_3dmNotes::m_window_bottom
int m_window_bottom
Definition opennurbs_3dm_properties.h:90
ON_3dmNotes::Default
void Default()
ON_3dmNotes::m_window_left
int m_window_left
Definition opennurbs_3dm_properties.h:87
ON_3dmNotes::~ON_3dmNotes
~ON_3dmNotes()
ON_3dmNotes::m_bHTML
ON_BOOL32 m_bHTML
Definition opennurbs_3dm_properties.h:84
ON_3dmNotes::Read
ON_BOOL32 Read(ON_BinaryArchive &)
ON_3dmNotes::IsValid
ON_BOOL32 IsValid() const
ON_3dmNotes::m_window_top
int m_window_top
Definition opennurbs_3dm_properties.h:88
ON_3dmNotes::Write
ON_BOOL32 Write(ON_BinaryArchive &) const
ON_3dmNotes::m_notes
ON_wString m_notes
Definition opennurbs_3dm_properties.h:82
ON_3dmNotes::m_bVisible
ON_BOOL32 m_bVisible
Definition opennurbs_3dm_properties.h:83
ON_3dmNotes::m_window_right
int m_window_right
Definition opennurbs_3dm_properties.h:89
ON_3dmNotes::Dump
void Dump(ON_TextLog &) const
ON_3dmProperties::~ON_3dmProperties
~ON_3dmProperties()
ON_3dmProperties::Dump
void Dump(ON_TextLog &) const
ON_3dmProperties::Read
ON_BOOL32 Read(ON_BinaryArchive &)
ON_3dmProperties::ON_3dmProperties
ON_3dmProperties()
ON_3dmProperties::ON_3dmProperties
ON_3dmProperties(const ON_3dmProperties &)
ON_3dmProperties::operator=
ON_3dmProperties & operator=(const ON_3dmProperties &)
ON_3dmProperties::m_PreviewImage
ON_WindowsBitmap m_PreviewImage
Definition opennurbs_3dm_properties.h:136
ON_3dmProperties::m_RevisionHistory
ON_3dmRevisionHistory m_RevisionHistory
Definition opennurbs_3dm_properties.h:134
ON_3dmProperties::m_Application
ON_3dmApplication m_Application
Definition opennurbs_3dm_properties.h:137
ON_3dmProperties::Default
void Default()
ON_3dmProperties::Write
ON_BOOL32 Write(ON_BinaryArchive &) const
ON_3dmProperties::m_Notes
ON_3dmNotes m_Notes
Definition opennurbs_3dm_properties.h:135
ON_3dmRevisionHistory
Definition opennurbs_3dm_properties.h:23
ON_3dmRevisionHistory::CreateTimeIsSet
bool CreateTimeIsSet() const
ON_3dmRevisionHistory::Write
ON_BOOL32 Write(ON_BinaryArchive &) const
ON_3dmRevisionHistory::LastEditedTimeIsSet
bool LastEditedTimeIsSet() const
ON_3dmRevisionHistory::m_sCreatedBy
ON_wString m_sCreatedBy
Definition opennurbs_3dm_properties.h:52
ON_3dmRevisionHistory::m_last_edit_time
struct tm m_last_edit_time
Definition opennurbs_3dm_properties.h:55
ON_3dmRevisionHistory::Read
ON_BOOL32 Read(ON_BinaryArchive &)
ON_3dmRevisionHistory::~ON_3dmRevisionHistory
~ON_3dmRevisionHistory()
ON_3dmRevisionHistory::Dump
void Dump(ON_TextLog &) const
ON_3dmRevisionHistory::m_sLastEditedBy
ON_wString m_sLastEditedBy
Definition opennurbs_3dm_properties.h:53
ON_3dmRevisionHistory::IsValid
ON_BOOL32 IsValid() const
ON_3dmRevisionHistory::Default
void Default()
ON_3dmRevisionHistory::ON_3dmRevisionHistory
ON_3dmRevisionHistory()
ON_3dmRevisionHistory::NewRevision
int NewRevision()
ON_3dmRevisionHistory::m_revision_count
int m_revision_count
Definition opennurbs_3dm_properties.h:56
ON_3dmRevisionHistory::m_create_time
struct tm m_create_time
Definition opennurbs_3dm_properties.h:54
ON_BinaryArchive
Definition opennurbs_archive.h:732
ON_TextLog
Definition opennurbs_textlog.h:23
ON_WindowsBitmap
Definition opennurbs_bitmap.h:342
ON_wString
Definition opennurbs_string.h:701