Rhino C++ API  8.8
Public Member Functions | Protected Member Functions | List of all members
ON_BinaryFile Class Reference

#include <opennurbs_archive.h>

Inheritance diagram for ON_BinaryFile:

Public Member Functions

 ON_BinaryFile (ON::archive_mode archive_mode)
 ON_BinaryFile (ON::archive_mode archive_mode, const char *file_system_path)
 ON_BinaryFile (ON::archive_mode archive_mode, const wchar_t *file_system_path)
 ON_BinaryFile (ON::archive_mode archive_mode, FILE *fp)
 ~ON_BinaryFile ()
bool AtEnd () const override
 ON_BinaryArchive overrides. More...
void CloseFile ()
void EnableMemoryBuffer (int=16384)
bool FileIsOpen () const
- Public Member Functions inherited from ON_BinaryArchive
 ON_BinaryArchive (ON::archive_mode)
virtual ~ON_BinaryArchive ()
ON_3dmArchiveTableType Active3dmTable () const
bool AddManifestMapItem (const class ON_ManifestMapItem &map_item)
const class ON_3dmPropertiesArchive3dmProperties () const
const class ON_3dmSettingsArchive3dmSettings () const
const ON_StringArchive3dmStartSectionComment () const
const ON_3dmArchiveTableStatus Archive3dmTableStatus (ON_3dmArchiveTableType table_type)
int Archive3dmVersion () const
bool ArchiveContains3dmTable (ON_3dmArchiveTableType table) const
const ON_DimStyleArchiveCurrentDimStyle () const
const ON_UUID ArchiveCurrentDimStyleId () const
const int ArchiveCurrentDimStyleIndex () const
const ON_wStringArchiveDirectoryName () const
const wchar_t * ArchiveDirectoryNameAsPointer () const
bool ArchiveFileMoved () const
const ON_wStringArchiveFileName () const
const wchar_t * ArchiveFileNameAsPointer () const
const ON_wStringArchiveFullPath () const
const wchar_t * ArchiveFullPathAsPointer () const
unsigned int ArchiveOpenNURBSVersion () const
ON::RuntimeEnvironment ArchiveRuntimeEnvironment () const
const ON_wStringArchiveSavedAsFullPath () const
const wchar_t * ArchiveSavedAsFullPathPointer () const
size_t ArchiveStartOffset () const
const ON_TextStyleArchiveTextStyleFromArchiveTextStyleIndex (int archive_text_style_index) const
unsigned int BadCRCCount () const
bool BeginRead3dmAnonymousChunk (int *version)
bool BeginRead3dmBigChunk (unsigned int *, ON__INT64 *)
bool BeginRead3dmBitmapTable ()
bool BeginRead3dmChunk (unsigned int expected_tcode, int *major_version, int *minor_version)
bool BeginRead3dmDimStyleTable ()
bool BeginRead3dmGroupTable ()
bool BeginRead3dmHatchPatternTable ()
bool BeginRead3dmHistoryRecordTable ()
bool BeginRead3dmInstanceDefinitionTable ()
bool BeginRead3dmLayerTable ()
bool BeginRead3dmLightTable ()
bool BeginRead3dmLinetypeTable ()
bool BeginRead3dmMaterialTable ()
bool BeginRead3dmObjectTable ()
bool BeginRead3dmTextureMappingTable ()
bool BeginRead3dmUserTable (ON_UUID &plugin_id, bool *bLastSavedAsGoo, int *archive_3dm_version, unsigned int *archive_opennurbs_version)
bool BeginReadDictionary (ON_UUID *dictionary_id, unsigned int *version, ON_wString &dictionary_name)
int BeginReadDictionaryEntry (int *de_type, ON_wString &entry_name)
bool BeginWrite3dmAnonymousChunk (int version)
bool BeginWrite3dmBigChunk (ON__UINT32 typecode, ON__INT64 value)
bool BeginWrite3dmBitmapTable ()
bool BeginWrite3dmChunk (unsigned int tcode, int major_version, int minor_version)
bool BeginWrite3dmChunk (unsigned int, int)
bool BeginWrite3dmDimStyleTable ()
bool BeginWrite3dmGroupTable ()
bool BeginWrite3dmHatchPatternTable ()
bool BeginWrite3dmHistoryRecordTable ()
bool BeginWrite3dmInstanceDefinitionTable ()
bool BeginWrite3dmLayerTable ()
bool BeginWrite3dmLightTable ()
bool BeginWrite3dmLinetypeTable ()
bool BeginWrite3dmMaterialTable ()
bool BeginWrite3dmObjectTable ()
bool BeginWrite3dmTextureMappingTable ()
bool BeginWrite3dmUserTable (const ON_UUID &)
bool BeginWrite3dmUserTable (ON_UUID plugin_id, bool bSavingGoo, int goo_3dm_version, unsigned int goo_opennurbs_version)
bool BeginWriteDictionary (ON_UUID dictionary_id, unsigned int version, const wchar_t *dictionary_name)
bool BeginWriteDictionaryEntry (int de_type, const wchar_t *entry_name)
bool CheckForRemappedIds () const
bool ChunkBoundaryCheck () const
void ClearModelSerialNumber ()
unsigned int CriticalErrorCount () const
ON__UINT64 CurrentPosition () const
unsigned int Dump3dmChunk (ON_TextLog &text_log, int recursion_depth=0)
bool EnableCRCCalculation (bool bEnable)
void EnableSave3dmAnalysisMeshes (unsigned int object_type_flags, bool bSave3dmAnalysisMeshes)
void EnableSave3dmRenderMeshes (unsigned int object_type_flags, bool bSave3dmRenderMeshes)
ON::endian Endian () const
 endian-ness of cpu More...
bool EndRead3dmBitmapTable ()
bool EndRead3dmChunk ()
bool EndRead3dmChunk (bool bSupressPartiallyReadChunkWarning)
bool EndRead3dmDimStyleTable ()
bool EndRead3dmGroupTable ()
bool EndRead3dmHatchPatternTable ()
bool EndRead3dmHistoryRecordTable ()
bool EndRead3dmInstanceDefinitionTable ()
bool EndRead3dmLayerTable ()
bool EndRead3dmLightTable ()
bool EndRead3dmLinetypeTable ()
bool EndRead3dmMaterialTable ()
bool EndRead3dmObjectTable ()
bool EndRead3dmTextureMappingTable ()
bool EndRead3dmUserTable ()
bool EndReadDictionary ()
bool EndReadDictionaryEntry ()
bool EndWrite3dmBitmapTable ()
bool EndWrite3dmChunk ()
 updates length in chunk header More...
bool EndWrite3dmDimStyleTable ()
bool EndWrite3dmGroupTable ()
bool EndWrite3dmHatchPatternTable ()
bool EndWrite3dmHistoryRecordTable ()
bool EndWrite3dmInstanceDefinitionTable ()
bool EndWrite3dmLayerTable ()
bool EndWrite3dmLightTable ()
bool EndWrite3dmLinetypeTable ()
bool EndWrite3dmMaterialTable ()
bool EndWrite3dmObjectTable ()
bool EndWrite3dmTextureMappingTable ()
bool EndWrite3dmUserTable ()
bool EndWriteDictionary ()
bool EndWriteDictionaryEntry ()
bool FindTableInDamagedArchive (unsigned int tcode_table, unsigned int tcode_record, ON_UUID class_uuid, int min_length_data)
ON_3dmArchiveTableType FirstFailed3dmTable () const
int GetCurrentChunk (ON_3DM_BIG_CHUNK &big_chunk) const
int GetCurrentChunk (ON_3DM_CHUNK &chunk) const
unsigned int InstanceDefinitionModelSerialNumber () const
void IntentionallyWriteCorrupt3dmStartSectionForExpertTesting ()
bool Internal_Read3dmDimStyleOverrides (class ON_Annotation &annotation, bool bFromDimStyleTable)
bool Internal_Write3dmDimStyleOverrides (const class ON_Annotation &annotation, const class ON_DimStyle *dim_style_overrides)
virtual int LoadUserDataApplication (ON_UUID application_id)
const class ON_ComponentManifestManifest () const
const class ON_ManifestMapManifestMap () const
ON::archive_mode Mode () const
unsigned int ModelSerialNumber () const
bool ObjectHasUserDataToWrite (const class ON_Object *object) const
 ON_DEPRECATED_MSG ("ON_BinaryArchive::ReadSize is deprecated because it truncates to 32-bits.\n" " - If you are updating existing code use 'ReadInt' instead.\n" " - Else if you need to write a 64-bit size_t please call 'ReadBigSize'") bool ReadSize(size_t *)
 < Read a single 32 bit size_t More...
 ON_DEPRECATED_MSG ("ON_BinaryArchive::WriteSize is deprecated because it truncates to 32-bits.\n" " - If you are updating existing code use 'WriteInt' instead.\n" " - Else if you need to write a 64-bit size_t please call 'WriteBigSize'") bool WriteSize(size_t)
 < Write a single 32 bit size_t More...
bool PeekAt3dmBigChunkType (ON__UINT32 *typecode, ON__INT64 *big_value)
bool PeekAt3dmChunkType (unsigned int *, int *)
ON_3dmArchiveTableType Previous3dmTable () const
bool Read3dmAnonymousUserTable (int archive_3dm_version, unsigned int archive_opennurbs_version, ON_3dmGoo &goo)
int Read3dmBitmap (class ON_Bitmap **)
bool Read3dmChunkVersion (int *, int *)
int Read3dmDimStyle (class ON_DimStyle **ppDimStyle)
bool Read3dmEndMark (size_t *)
bool Read3dmGoo (ON_3dmGoo &)
 Call to read "goo". More...
int Read3dmGroup (class ON_Group **)
int Read3dmHatchPattern (class ON_HatchPattern **)
int Read3dmHistoryRecord (class ON_HistoryRecord *&)
int Read3dmInstanceDefinition (class ON_InstanceDefinition **)
int Read3dmLayer (ON_Layer **)
int Read3dmLight (class ON_Light **light, class ON_3dmObjectAttributes *attributes)
int Read3dmLinetype (class ON_Linetype **)
int Read3dmMaterial (class ON_Material **)
int Read3dmModelGeometry (class ON_ModelGeometryComponent **model_geometry, unsigned int object_filter=0)
 Call either Read3dmModelGeometry or Read3dmObject. More...
int Read3dmModelGeometryForExperts (bool bManageGeometry, bool bManageAttributes, class ON_ModelGeometryComponent **model_geometry, unsigned int object_filter)
int Read3dmModelLight (class ON_ModelGeometryComponent **model_light)
 Call either Read3dmModelLight or Read3dmLight. More...
int Read3dmObject (ON_Object **model_object, ON_3dmObjectAttributes *attributes, unsigned int object_filter=0)
bool Read3dmProperties (class ON_3dmProperties &)
bool Read3dmReferencedComponentId (ON_ModelComponent::Type component_type, ON_UUID *component_id)
bool Read3dmReferencedComponentIndex (ON_ModelComponent::Type component_type, int *component_index)
bool Read3dmReferencedComponentIndexArray (ON_ModelComponent::Type component_type, ON_SimpleArray< int > &component_index_array)
bool Read3dmSettings (class ON_3dmSettings &)
bool Read3dmStartSection (int *version, ON_String &sStartSectionComment)
int Read3dmTextureMapping (class ON_TextureMapping **)
bool ReadArc (ON_Arc &)
bool ReadArray (ON_ClassArray< class ON_ObjRef > &)
bool ReadArray (ON_ClassArray< ON_MappingRef > &)
bool ReadArray (ON_ClassArray< ON_MaterialRef > &)
bool ReadArray (ON_ClassArray< ON_String > &)
bool ReadArray (ON_ClassArray< ON_wString > &)
bool ReadArray (ON_ObjectArray< class ON_Layer > &)
bool ReadArray (ON_SimpleArray< bool > &)
bool ReadArray (ON_SimpleArray< char > &)
bool ReadArray (ON_SimpleArray< class ON_ClippingPlaneInfo > &)
bool ReadArray (ON_SimpleArray< class ON_Layer * > &)
bool ReadArray (ON_SimpleArray< class ON_ObjRef_IRefID > &)
bool ReadArray (ON_SimpleArray< double > &)
bool ReadArray (ON_SimpleArray< float > &)
bool ReadArray (ON_SimpleArray< ON_2dPoint > &)
bool ReadArray (ON_SimpleArray< ON_2dVector > &)
bool ReadArray (ON_SimpleArray< ON_2fPoint > &)
bool ReadArray (ON_SimpleArray< ON_2fVector > &)
bool ReadArray (ON_SimpleArray< ON_3dPoint > &)
bool ReadArray (ON_SimpleArray< ON_3dVector > &)
bool ReadArray (ON_SimpleArray< ON_3fPoint > &)
bool ReadArray (ON_SimpleArray< ON_3fVector > &)
bool ReadArray (ON_SimpleArray< ON_4dPoint > &)
bool ReadArray (ON_SimpleArray< ON_4fPoint > &)
bool ReadArray (ON_SimpleArray< ON__INT16 > &)
bool ReadArray (ON_SimpleArray< ON__INT32 > &)
bool ReadArray (ON_SimpleArray< ON__INT8 > &)
bool ReadArray (ON_SimpleArray< ON__UINT16 > &)
bool ReadArray (ON_SimpleArray< ON__UINT32 > &)
bool ReadArray (ON_SimpleArray< ON__UINT8 > &)
bool ReadArray (ON_SimpleArray< ON_Color > &)
bool ReadArray (ON_SimpleArray< ON_DisplayMaterialRef > &)
bool ReadArray (ON_SimpleArray< ON_LinetypeSegment > &)
bool ReadArray (ON_SimpleArray< ON_MappingChannel > &)
bool ReadArray (ON_SimpleArray< ON_SurfaceCurvature > &)
bool ReadArray (ON_SimpleArray< ON_UUID > &)
bool ReadArray (ON_SimpleArray< ON_UuidIndex > &)
bool ReadArray (ON_SimpleArray< ON_UuidPtr > &)
bool ReadArray (ON_SimpleArray< ON_Xform > &)
bool ReadBigInt (ON__INT64 *)
bool ReadBigInt (ON__UINT64 *)
bool ReadBigInt (size_t, ON__INT64 *)
bool ReadBigInt (size_t, ON__UINT64 *)
bool ReadBigSize (size_t *)
 64 bits More...
bool ReadBigTime (time_t *)
 UCT seconds since 1 January 1970 (64 bits) More...
bool ReadBool (bool *)
bool ReadBoundingBox (ON_BoundingBox &)
ON__UINT64 ReadBuffer (ON__UINT64 sizeof_buffer, void *buffer)
bool ReadByte (size_t, void *)
 must fail if mode is not read or readwrite More...
bool ReadChar (char *)
bool ReadChar (ON__INT8 *)
bool ReadChar (ON__UINT8 *)
bool ReadChar (size_t, char *)
bool ReadChar (size_t, ON__INT8 *)
bool ReadChar (size_t, ON__UINT8 *)
bool ReadCircle (ON_Circle &)
bool ReadColor (ON_4fColor &)
bool ReadColor (ON_Color &)
bool ReadComponentIndex (ON_COMPONENT_INDEX &)
bool ReadCompressedBuffer (size_t sizeof__outbuffer, void *outbuffer, bool *bFailedCRC)
bool ReadCompressedBufferSize (size_t *sizeof__outbuffer)
bool ReadDisplayMaterialRef (ON_DisplayMaterialRef &)
bool ReadDouble (double *)
bool ReadDouble (size_t, double *)
bool ReadFloat (float *)
bool ReadFloat (size_t, float *)
bool ReadInt (ON__INT32 *)
bool ReadInt (ON__UINT32 *)
bool ReadInt (size_t, ON__INT32 *)
bool ReadInt (size_t, ON__UINT32 *)
bool ReadInterval (ON_Interval &)
bool ReadLine (ON_Line &)
bool ReadLinetypeSegment (ON_LinetypeSegment &)
bool ReadLong (long *)
bool ReadLong (size_t, long *)
bool ReadLong (size_t, unsigned long *)
bool ReadLong (unsigned long *)
bool ReadMode () const
bool ReadModelComponentAttributes (ON_ModelComponent &model_component, unsigned int *attributes_filter)
int ReadObject (ON_Object &object)
int ReadObject (ON_Object **ppObject)
bool ReadObjectUserData (ON_Object &object)
bool ReadPlane (ON_Plane &)
bool ReadPlaneEquation (ON_PlaneEquation &)
bool ReadPoint (ON_2dPoint &)
bool ReadPoint (ON_3dPoint &)
bool ReadPoint (ON_4dPoint &)
bool ReadShort (ON__INT16 *)
bool ReadShort (ON__UINT16 *)
bool ReadShort (size_t, ON__INT16 *)
bool ReadShort (size_t, ON__UINT16 *)
bool ReadString (ON_String &sUTF8)
bool ReadString (ON_wString &s)
bool ReadString (size_t str_array_count, char *str_array)
bool ReadString (size_t str_array_count, unsigned char *str_array)
bool ReadString (size_t str_array_count, unsigned short *str_array)
bool ReadStringSize (size_t *str_array_count)
bool ReadStringUTF16ElementCount (size_t *string_utf16_element_count)
bool ReadStringUTF8ElementCount (size_t *string_utf8_element_count)
bool ReadTime (struct tm &)
bool ReadUuid (ON_UUID &)
bool ReadV1_TCODE_ANNOTATION (unsigned int, ON_Object **, ON_3dmObjectAttributes *)
bool ReadV1_TCODE_LEGACY_CRV (ON_Object **, ON_3dmObjectAttributes *)
bool ReadV1_TCODE_LEGACY_FAC (ON_Object **, ON_3dmObjectAttributes *)
bool ReadV1_TCODE_LEGACY_SHL (ON_Object **, ON_3dmObjectAttributes *)
bool ReadV1_TCODE_MESH_OBJECT (ON_Object **, ON_3dmObjectAttributes *)
bool ReadV1_TCODE_RH_POINT (ON_Object **, ON_3dmObjectAttributes *)
 helpers for reading V1 objects More...
bool ReadV1_TCODE_RHINOIO_OBJECT_BREP (ON_Object **, ON_3dmObjectAttributes *)
bool ReadV1_TCODE_RHINOIO_OBJECT_NURBS_CURVE (ON_Object **, ON_3dmObjectAttributes *)
bool ReadV1_TCODE_RHINOIO_OBJECT_NURBS_SURFACE (ON_Object **, ON_3dmObjectAttributes *)
bool ReadVector (ON_2dVector &)
bool ReadVector (ON_3dVector &)
bool ReadWideString (ON_wString &wide_string)
bool ReadXform (ON_Xform &)
bool ReferencedComponentIdMapping () const
bool ReferencedComponentIndexMapping () const
unsigned int ReferenceModelSerialNumber () const
bool Save3dmAnalysisMesh (ON::object_type object_type) const
unsigned int Save3dmAnalysisMeshObjectTypeFlags () const
bool Save3dmPreviewImage () const
bool Save3dmRenderMesh (ON::object_type object_type) const
unsigned int Save3dmRenderMeshObjectTypeFlags () const
bool Seek3dmChunkFromCurrentPosition (unsigned int)
bool Seek3dmChunkFromStart (unsigned int)
bool SeekBackward (ON__UINT64 bytes_backward)
bool SeekForward (ON__UINT64 bytes_forward)
bool SeekFromStart (ON__UINT64 bytes_from_start)
bool SetArchive3dmVersion (int)
void SetArchiveFullPath (const wchar_t *archive_directory_name, const wchar_t *archive_file_name)
void SetArchiveFullPath (const wchar_t *archive_full_path)
void SetCheckForRemappedIds (bool bCheckForRemappedIds)
void SetChunkBoundaryCheck (bool bChunkBoundaryCheck)
void SetModelSerialNumber (unsigned int model_serial_number, unsigned int reference_model_serial_number, unsigned int instance_definition_model_serial_number)
bool SetOpenNURBS3dmVersion (unsigned int v)
void SetReferencedComponentIdMapping (bool bEnableReferenceComponentIdMapping)
void SetReferencedComponentIndexMapping (bool bEnableReferenceComponentIndexMapping)
void SetSave3dmPreviewImage (bool bSave3dmPreviewImage)
bool SetShouldSerializeUserDataDefault (bool bSerialize)
bool SetShouldSerializeUserDataItem (ON_UUID application_id, ON_UUID item_id, bool bSerializeUserDataItem)
void SetStorageDeviceError (ON_BinaryArchive::eStorageDeviceError storage_device_error)
void SetStorageDeviceError (unsigned int storage_device_error)
void SetUseBufferCompression (bool bUseBufferCompression)
bool ShouldSerializeAllUserData () const
bool ShouldSerializeNoUserData () const
bool ShouldSerializeSomeUserData () const
bool ShouldSerializeUserDataDefault () const
bool ShouldSerializeUserDataItem (ON_UUID application_id, ON_UUID item_id) const
bool ShouldWriteUserDataItem (const class ON_Object *object, const class ON_UserData *object_user_data) const
size_t SizeofChunkLength () const
unsigned int StorageDeviceError () const
bool UnsetMode () const
bool UpdateManifestMapItemDestination (const class ON_ManifestMapItem &map_item)
bool UseBufferCompression () const
bool Write3dmAnonymousUserTable (const class ON_3dmGoo &)
bool Write3dmAnonymousUserTableRecord (ON_UUID plugin_id, int goo_3dm_version, unsigned int goo_opennurbs_version, const class ON_3dmGoo &goo)
bool Write3dmBitmap (const class ON_Bitmap &)
bool Write3dmChunkVersion (int, int)
bool Write3dmDimStyle (const class ON_DimStyle &)
bool Write3dmDimStyleComponent (const class ON_ModelComponent *model_component)
bool Write3dmDimStyleComponent (const class ON_ModelComponentReference &model_component_reference)
bool Write3dmEndMark ()
bool Write3dmGoo (const ON_3dmGoo &)
 call to write "goo" More...
bool Write3dmGroup (const class ON_Group &)
bool Write3dmGroupComponent (const class ON_ModelComponent *model_component)
bool Write3dmGroupComponent (const class ON_ModelComponentReference &model_component_reference)
bool Write3dmHatchPattern (const class ON_HatchPattern &)
bool Write3dmHatchPatternComponent (const class ON_ModelComponent *model_component)
bool Write3dmHatchPatternComponent (const class ON_ModelComponentReference &model_component_reference)
bool Write3dmHistoryRecord (const class ON_HistoryRecord &)
bool Write3dmHistoryRecordComponent (const class ON_ModelComponent *model_component)
bool Write3dmHistoryRecordComponent (const class ON_ModelComponentReference &model_component_reference)
bool Write3dmImageComponent (const class ON_ModelComponent *model_component)
bool Write3dmImageComponent (const class ON_ModelComponentReference &model_component_reference)
bool Write3dmInstanceDefinition (const class ON_InstanceDefinition &)
bool Write3dmInstanceDefinitionComponent (const class ON_ModelComponent *model_component)
bool Write3dmInstanceDefinitionComponent (const class ON_ModelComponentReference &model_component_reference)
bool Write3dmLayer (const ON_Layer &)
bool Write3dmLayerComponent (const class ON_ModelComponent *model_component)
bool Write3dmLayerComponent (const class ON_ModelComponentReference &model_component_reference)
bool Write3dmLight (const class ON_Light &, const class ON_3dmObjectAttributes *)
bool Write3dmLinePatternComponent (const class ON_ModelComponent *model_component)
bool Write3dmLinePatternComponent (const class ON_ModelComponentReference &model_component_reference)
bool Write3dmLinetype (const class ON_Linetype &line_pattern)
bool Write3dmMaterial (const class ON_Material &)
bool Write3dmMaterialComponent (const class ON_ModelComponent *model_component)
bool Write3dmMaterialComponent (const class ON_ModelComponentReference &model_component_reference)
bool Write3dmModelGeometryComponent (const class ON_ModelComponentReference &model_component_reference)
bool Write3dmModelGeometryComponent (const class ON_ModelGeometryComponent *model_geometry)
bool Write3dmModelLightComponent (const class ON_ModelComponentReference &model_component_reference)
bool Write3dmModelLightComponent (const class ON_ModelGeometryComponent *model_light)
bool Write3dmObject (const ON_Object &, const ON_3dmObjectAttributes *)
bool Write3dmProperties (const class ON_3dmProperties &)
bool Write3dmReferencedComponentId (const ON_ModelComponent &model_component)
bool Write3dmReferencedComponentId (ON_ModelComponent::Type component_type, ON_UUID model_component_id)
bool Write3dmReferencedComponentIndex (const ON_ModelComponent &model_component)
bool Write3dmReferencedComponentIndex (ON_ModelComponent::Type component_type, int model_component_index)
bool Write3dmReferencedComponentIndex (ON_ModelComponent::Type component_type, ON_UUID model_component_id)
bool Write3dmSettings (const class ON_3dmSettings &)
bool Write3dmStartSection (int version, const char *sStartSectionComment)
bool Write3dmTextureMapping (const class ON_TextureMapping &)
bool Write3dmTextureMappingComponent (const class ON_ModelComponent *model_component)
bool Write3dmTextureMappingComponent (const class ON_ModelComponentReference &model_component_reference)
bool WriteArc (const ON_Arc &)
bool WriteArray (const ON_ClassArray< class ON_ObjRef > &)
bool WriteArray (const ON_ClassArray< ON_MappingRef > &)
bool WriteArray (const ON_ClassArray< ON_MaterialRef > &)
bool WriteArray (const ON_ClassArray< ON_String > &)
bool WriteArray (const ON_ClassArray< ON_wString > &)
bool WriteArray (const ON_SimpleArray< bool > &)
bool WriteArray (const ON_SimpleArray< char > &)
bool WriteArray (const ON_SimpleArray< class ON_ClippingPlaneInfo > &)
bool WriteArray (const ON_SimpleArray< class ON_ObjRef_IRefID > &)
bool WriteArray (const ON_SimpleArray< double > &)
bool WriteArray (const ON_SimpleArray< float > &)
bool WriteArray (const ON_SimpleArray< ON_2dPoint > &)
bool WriteArray (const ON_SimpleArray< ON_2dVector > &)
bool WriteArray (const ON_SimpleArray< ON_2fPoint > &)
bool WriteArray (const ON_SimpleArray< ON_2fVector > &)
bool WriteArray (const ON_SimpleArray< ON_3dPoint > &)
bool WriteArray (const ON_SimpleArray< ON_3dVector > &)
bool WriteArray (const ON_SimpleArray< ON_3fPoint > &)
bool WriteArray (const ON_SimpleArray< ON_3fVector > &)
bool WriteArray (const ON_SimpleArray< ON_4dPoint > &)
bool WriteArray (const ON_SimpleArray< ON_4fPoint > &)
bool WriteArray (const ON_SimpleArray< ON__INT16 > &)
bool WriteArray (const ON_SimpleArray< ON__INT32 > &)
bool WriteArray (const ON_SimpleArray< ON__INT8 > &)
bool WriteArray (const ON_SimpleArray< ON__UINT16 > &)
bool WriteArray (const ON_SimpleArray< ON__UINT32 > &)
bool WriteArray (const ON_SimpleArray< ON__UINT8 > &)
bool WriteArray (const ON_SimpleArray< ON_Color > &)
bool WriteArray (const ON_SimpleArray< ON_DisplayMaterialRef > &)
bool WriteArray (const ON_SimpleArray< ON_LinetypeSegment > &)
bool WriteArray (const ON_SimpleArray< ON_MappingChannel > &)
bool WriteArray (const ON_SimpleArray< ON_SurfaceCurvature > &)
bool WriteArray (const ON_SimpleArray< ON_UUID > &)
bool WriteArray (const ON_SimpleArray< ON_UuidIndex > &)
bool WriteArray (const ON_SimpleArray< ON_UuidPtr > &)
bool WriteArray (const ON_SimpleArray< ON_Xform > &)
bool WriteArray (int count, const class ON_Layer *)
bool WriteArray (int count, const class ON_Layer *const *)
bool WriteBigInt (ON__INT64)
bool WriteBigInt (ON__UINT64)
bool WriteBigInt (size_t, const ON__INT64 *)
bool WriteBigInt (size_t, const ON__UINT64 *)
bool WriteBigSize (size_t)
 64 bits More...
bool WriteBigTime (time_t)
 UCT seconds since 1 January 1970 (64 bits) More...
bool WriteBool (bool)
bool WriteBoolFalse ()
bool WriteBoolTrue ()
bool WriteBoundingBox (const ON_BoundingBox &)
bool WriteByte (size_t, const void *)
 must fail if mode is not write or readwrite More...
bool WriteChar (char)
bool WriteChar (ON__INT8)
bool WriteChar (ON__UINT8)
bool WriteChar (size_t, const char *)
bool WriteChar (size_t, const ON__INT8 *)
bool WriteChar (size_t, const ON__UINT8 *)
bool WriteCircle (const ON_Circle &)
bool WriteColor (const ON_4fColor &)
bool WriteColor (const ON_Color &)
bool WriteComponentIndex (const ON_COMPONENT_INDEX &)
bool WriteCompressedBuffer (size_t sizeof__inbuffer, const void *inbuffer)
bool WriteDisplayMaterialRef (const ON_DisplayMaterialRef &)
bool WriteDouble (double)
bool WriteDouble (size_t, const double *)
bool WriteFloat (float)
bool WriteFloat (size_t, const float *)
bool WriteInt (ON__INT32)
bool WriteInt (ON__UINT32)
bool WriteInt (size_t, const ON__INT32 *)
bool WriteInt (size_t, const ON__UINT32 *)
bool WriteInterval (const ON_Interval &)
bool WriteLine (const ON_Line &)
bool WriteLinetypeSegment (const ON_LinetypeSegment &)
bool WriteLong (long)
bool WriteLong (size_t, const long *)
bool WriteLong (size_t, const unsigned long *)
bool WriteLong (unsigned long)
bool WriteMode () const
bool WriteModelComponentAttributes (const class ON_ModelComponent &model_component, unsigned int attributes_filter)
bool WriteModelComponentName (const ON_ModelComponent &model_component)
bool WriteObject (const ON_Object &)
 writes object definition More...
bool WriteObject (const ON_Object *)
 writes object definition More...
bool WriteObjectUserData (const ON_Object &object)
bool WritePlane (const ON_Plane &)
bool WritePlaneEquation (const ON_PlaneEquation &)
bool WritePoint (const ON_2dPoint &)
bool WritePoint (const ON_3dPoint &)
bool WritePoint (const ON_4dPoint &)
bool WriteShort (ON__INT16)
bool WriteShort (ON__UINT16)
bool WriteShort (size_t, const ON__INT16 *)
bool WriteShort (size_t, const ON__UINT16 *)
bool WriteString (const char *sUTF8)
bool WriteString (const ON_String &sUTF8)
bool WriteString (const ON_wString &s)
bool WriteString (const unsigned char *sUTF8)
bool WriteTime (const struct tm &)
bool WriteUTF16String (const unsigned short *sUTF16)
bool WriteUuid (const ON_UUID &)
bool WriteVector (const ON_2dVector &)
bool WriteVector (const ON_3dVector &)
bool WriteWideString (const ON_wString &wide_string)
bool WriteWideString (const wchar_t *sWideChar, int sWideChar_count)
bool WriteXform (const ON_Xform &)

Protected Member Functions

bool Flush () override
ON__UINT64 Internal_CurrentPositionOverride () const override
 ON_BinaryArchive overrides. More...
size_t Internal_ReadOverride (size_t, void *) override
 ON_BinaryArchive overrides. More...
bool Internal_SeekFromCurrentPositionOverride (int byte_offset) override
bool Internal_SeekToStartOverride () override
size_t Internal_WriteOverride (size_t, const void *) override
- Protected Member Functions inherited from ON_BinaryArchive
unsigned int ErrorMessageMask () const
bool MaskReadError (ON__UINT64 sizeof_request, ON__UINT64 sizeof_read) const

Additional Inherited Members

- Public Types inherited from ON_BinaryArchive
enum  eStorageDeviceError : unsigned int {
  eStorageDeviceError::None = 0, eStorageDeviceError::WriteFailed = 0xFFFFFFF1, eStorageDeviceError::SeekFailedDuringWriting = 0xFFFFFFF2, eStorageDeviceError::ReadFailed = 0xFFFFFFF8,
  eStorageDeviceError::SeekFailedDuringReading = 0xFFFFFFF9, eStorageDeviceError::UnknownDeviceError = 0xFFFFFFFFU
- Static Public Member Functions inherited from ON_BinaryArchive
static bool ArchiveContains3dmTable (ON_3dmArchiveTableType table, unsigned int archive_3dm_version, unsigned int opennurbs_library_version)
static unsigned int ArchiveOpenNURBSVersionToWrite (unsigned int archive_3dm_version, unsigned int opennurbs_version)
static int CurrentArchiveVersion ()
static char * ON_TypecodeParse (unsigned int tcode, char *typecode_name, size_t max_length)
static ON_BinaryArchive::eStorageDeviceError StorageDeviceErrorFromUnsigned (unsigned int storage_device_error_as_unsigned)
static ON_ModelComponent::Type TableComponentType (ON_3dmArchiveTableType table_type)
static bool ToggleByteOrder (size_t, size_t, const void *, void *)
static const char * TypecodeName (unsigned int tcode)

Constructor & Destructor Documentation

◆ ON_BinaryFile() [1/4]

ON_BinaryFile::ON_BinaryFile ( ON::archive_mode  archive_mode)

◆ ON_BinaryFile() [2/4]

ON_BinaryFile::ON_BinaryFile ( ON::archive_mode  archive_mode,
FILE *  fp 

Description: Create an ON_BinaryArchive that reads/writes from an ordinary file. Parameters: archive_mode - [in] fp - [in] If a file is being read, fp is the pointer returned from ON_FileStream::Open(...,"rb"). If a file is being written, fp is the pointer returned from ON_FileStream::Open(...,"wb").

◆ ON_BinaryFile() [3/4]

ON_BinaryFile::ON_BinaryFile ( ON::archive_mode  archive_mode,
const wchar_t *  file_system_path 

Description: Create an ON_BinaryArchive that reads/writes from an ordinary file. Parameters: archive_mode - [in] file_system_path - [in] path to file being read or written.

◆ ON_BinaryFile() [4/4]

ON_BinaryFile::ON_BinaryFile ( ON::archive_mode  archive_mode,
const char *  file_system_path 

Description: Create an ON_BinaryArchive that reads/writes from an ordinary file. Parameters: archive_mode - [in] file_system_path - [in] path to file being read or written.

◆ ~ON_BinaryFile()

ON_BinaryFile::~ON_BinaryFile ( )

Member Function Documentation

◆ AtEnd()

bool ON_BinaryFile::AtEnd ( ) const

ON_BinaryArchive overrides.

Implements ON_BinaryArchive.

◆ CloseFile()

void ON_BinaryFile::CloseFile ( )

◆ EnableMemoryBuffer()

void ON_BinaryFile::EnableMemoryBuffer ( int  = 16384)

fseek from end (since the file has an end) bool SeekFromEnd( int );
To use custom memory buffering instead of relying on fread()/fwrite()'s build in buffering, call EnableMemoryBuffer() with the buffer size immediately after constructing the ON_BinaryFile. There appear to be enough bugs in existing Windows NT/2000 NETWORK I/O that using this hack will speed up I/O by factors of 10 to 100.

◆ FileIsOpen()

bool ON_BinaryFile::FileIsOpen ( ) const

Returns: True if a file stream is open (nullptr != m_fp).

◆ Flush()

bool ON_BinaryFile::Flush ( )

Description: Force Write() to flush any buffered data to physical archive. Returns: True if successful or if there is nothing to flush. False if information could not be flushed.

Implements ON_BinaryArchive.

◆ Internal_CurrentPositionOverride()

ON__UINT64 ON_BinaryFile::Internal_CurrentPositionOverride ( ) const

ON_BinaryArchive overrides.

Implements ON_BinaryArchive.

◆ Internal_ReadOverride()

size_t ON_BinaryFile::Internal_ReadOverride ( size_t  ,
void *   

ON_BinaryArchive overrides.

return actual number of bytes read (like fread())

Implements ON_BinaryArchive.

◆ Internal_SeekFromCurrentPositionOverride()

bool ON_BinaryFile::Internal_SeekFromCurrentPositionOverride ( int  byte_offset)

Implements ON_BinaryArchive.

◆ Internal_SeekToStartOverride()

bool ON_BinaryFile::Internal_SeekToStartOverride ( )

Implements ON_BinaryArchive.

◆ Internal_WriteOverride()

size_t ON_BinaryFile::Internal_WriteOverride ( size_t  ,
const void *   

Implements ON_BinaryArchive.