17 #if !defined(ON_ARCHIVE_INC_) 
   18 #define ON_ARCHIVE_INC_ 
   34   static FILE* 
Open( 
const wchar_t* filename, 
const wchar_t* mode );
 
   47   static FILE* 
Open( 
const char* filename, 
const char* mode );
 
  116   static bool Seek( FILE* fp, ON__INT64 offset, 
int orgin );
 
  131   static ON__UINT64 
Read( FILE* fp, ON__UINT64 count, 
void* buffer );
 
  146   static ON__UINT64 
Write( FILE* fp, ON__UINT64 count, 
const void* buffer );
 
  181     ON__UINT64* file_size,
 
  182     ON__UINT64* file_create_time,
 
  183     ON__UINT64* file_last_modified_time
 
  239     const wchar_t* directory_name, 
 
  240     const wchar_t* file_name_filter
 
  244     const char* directory_name, 
 
  245     const char* file_name_filter
 
  305 #if defined(ON_COMPILER_MSC) 
  306   ON__UINT32 m_file_attributes_mask;
 
  308   WIN32_FIND_DATA m_fd;
 
  313   struct dirent m_dirent;
 
  314   char m_dirent_name_buffer[NAME_MAX+1]; 
 
  317   wchar_t m_current_name[1024];
 
  318   ON__UINT64 m_current_file_attributes; 
 
  319   ON__UINT64 m_current_file_size;
 
  320   ON__UINT64 m_current_file_create_time;
 
  321   ON__UINT64 m_current_last_modified_time;
 
  322   ON__UINT64 m_current_last_access_time;
 
  332 typedef void (*ON_Buffer_ErrorHandler)(
class ON_Buffer*);
 
  386   ON__UINT32 
CRC32( ON__UINT32 current_remainder ) 
const;
 
  409   ON__UINT64 
Write( ON__UINT64 size, 
const void* buffer );
 
  430   ON__UINT64 
Read( ON__UINT64 size, 
void* buffer );
 
  434     seek_from_beginning_of_file = 0,
 
  435     seek_from_current_position = 1,
 
  436     seek_from_end_of_file = 2
 
  625   ON__UINT64 m_buffer_size; 
 
  626   ON__UINT64 m_current_position;
 
  628   struct ON_BUFFER_SEGMENT* m_first_segment;
 
  629   struct ON_BUFFER_SEGMENT* m_last_segment;
 
  630   struct ON_BUFFER_SEGMENT* m_current_segment;
 
  631   bool SetCurrentSegment(
bool);
 
  634   ON_MEMORY_POOL* m_heap;
 
  635   ON_Buffer_ErrorHandler m_error_handler;
 
  637   ON__UINT32 m_last_error;
 
  638   unsigned char m_reserved[12];
 
  656 class ON_ObjectAttributes;
 
  700 bool ON_IsLongChunkTypecode(ON__UINT32 typecode);
 
  702 bool ON_IsShortChunkTypecode(ON__UINT32 typecode);
 
  704 #if defined(ON_DLL_TEMPLATE) 
  708 #pragma warning( push ) 
  709 #pragma warning( disable : 4231 ) 
  712 #pragma warning( pop ) 
  806   ON__UINT64 
ReadBuffer( ON__UINT64 sizeof_buffer, 
void* buffer );
 
  871           std::size_t sizeof__outbuffer,
 
  886     std::size_t sizeof__inbuffer,
 
 1049       std::size_t* str_array_count
 
 1062     std::size_t* string_utf8_element_count
 
 1075     std::size_t* string_utf16_element_count
 
 1093       std::size_t str_array_count,
 
 1111       std::size_t str_array_count,
 
 1112       unsigned char* str_array
 
 1129       std::size_t str_array_count,
 
 1130       unsigned short*  str_array
 
 1181       const unsigned char*    
 
 1196       const unsigned short*    
 
 1241       const unsigned long*      
 
 1359       const unsigned char* sUTF8
 
 1381       const unsigned short* sUTF16
 
 1523         const char* sStartSectionComment
 
 1937     int goo_3dm_version,
 
 1938     int goo_opennurbs_version
 
 1966     int goo_3dm_version,
 
 1967     int goo_opennurbs_version,
 
 1996     bool* bLastSavedAsGoo,
 
 1997     int* archive_3dm_version,
 
 1998     int* archive_opennurbs_version
 
 2010     int archive_3dm_version,
 
 2011     int archive_opennurbs_version,
 
 2086         ON__UINT32 typecode,
 
 2141         unsigned int expected_tcode,
 
 2186           unsigned int version,
 
 2187           const wchar_t* dictionary_name
 
 2225           const wchar_t* entry_name
 
 2231           unsigned int* version,
 
 2263         ON__UINT32* typecode,
 
 2264         ON__INT64* big_value
 
 2383     no_active_table = 0,
 
 2430           unsigned int tcode_table,
 
 2431           unsigned int tcode_record,
 
 2454         int recursion_depth = 0
 
 2466   std::size_t 
Read( std::size_t, 
void* ) = 0; 
 
 2475   std::size_t 
Write( std::size_t, 
const void* ) = 0;
 
 2510   bool WriteInt8( std::size_t, 
const ON__INT8* );
 
 2511   bool ReadInt8( std::size_t, ON__INT8* );
 
 2514   bool WriteInt16( std::size_t, 
const ON__INT16* );
 
 2515   bool ReadInt16( std::size_t, ON__INT16* );
 
 2518   bool WriteInt32( std::size_t, 
const ON__INT32* );
 
 2519   bool ReadInt32( std::size_t, ON__INT32* );
 
 2522   bool WriteInt64( std::size_t, 
const ON__INT64* );
 
 2523   bool ReadInt64(  std::size_t, ON__INT64* );
 
 2525   bool BeginWrite3dmTable( 
 
 2528   bool EndWrite3dmTable( 
 
 2531   bool BeginRead3dmTable( 
 
 2534   bool EndRead3dmTable( 
 
 2547   int  Read3dmV1Object( 
 
 2557   bool Read3dmV1AttributesOrMaterial( 
 
 2562             class ON__3dmV1_XDATA* = 0 
 
 2565   int  Read3dmV1LayerIndex( 
const char* ) 
const;
 
 2580   ON::archive_mode Mode() 
const; 
 
 2581   void UpdateCRC( std::size_t, 
const void* );
 
 2585   int m_3dm_v1_layer_index;
 
 2586   int m_3dm_v1_material_index;
 
 2606   unsigned int m_error_message_mask;
 
 2635   int m_3dm_opennurbs_version;
 
 2641   std::size_t m_3dm_start_section_offset;
 
 2645   table_type TableTypeFromTypecode( 
unsigned int ); 
 
 2650   bool PushBigChunk( ON__UINT32 typecode, ON__INT64 value );
 
 2652   bool WriteChunkTypecode( ON__UINT32 );
 
 2653   bool ReadChunkTypecode( ON__UINT32* );
 
 2654   bool WriteChunkValue( ON__UINT32 typecode, ON__INT64 );
 
 2655   bool WriteChunkLength( ON__UINT64 );
 
 2656   bool ReadChunkValue( ON__UINT32 typecode, ON__INT64* value64 );
 
 2657   bool FindMisplacedTable( 
 
 2658         ON__UINT64 filelength,
 
 2659         const ON__UINT32 table_tocde,
 
 2660         const ON__UINT32 table_record_record,
 
 2662         const ON__UINT64 min_length_data
 
 2665   bool ReadObjectUserDataAnonymousChunk(
 
 2666           const ON__UINT64 length_TCODE_ANONYMOUS_CHUNK,
 
 2667           const int archive_3dm_version,
 
 2668           const int archive_opennurbs_version,
 
 2675   bool WriteEOFSizeOfFile( ON__UINT64 );
 
 2676   bool ReadEOFSizeOfFile( ON__UINT64* );
 
 2680   int m_bad_CRC_count; 
 
 2690       sizeof_x_buffer = 16384
 
 2692     unsigned char    buffer[sizeof_x_buffer];
 
 2697   std::size_t WriteDeflate(
 
 2705   bool CompressionInit();
 
 2706   void CompressionEnd();
 
 2711   ON::endian m_endian;
 
 2713   ON::archive_mode m_mode;
 
 2716   bool m_bSaveUserData; 
 
 2717   bool m_bSavePreviewImage;    
 
 2718   bool m_bEmbedTextureBitmaps; 
 
 2719   bool m_bSaveRenderMeshes;    
 
 2720   bool m_bSaveAnalysisMeshes;  
 
 2727   struct ON__3dmV1LayerIndex* m_V1_layer_list;
 
 2797   std::size_t 
Read( std::size_t, 
void* );
 
 2798   std::size_t 
Write( std::size_t, 
const void* );
 
 2811   std::size_t m_memory_buffer_capacity;
 
 2812   std::size_t m_memory_buffer_size;
 
 2813   std::size_t m_memory_buffer_ptr;
 
 2814   unsigned char* m_memory_buffer;
 
 2868   std::size_t 
Read( std::size_t, 
void* );
 
 2869   std::size_t 
Write( std::size_t, 
const void* );
 
 2907     std::size_t sizeof_buffer, 
 
 2910     int archive_3dm_version,
 
 2911     int archive_opennurbs_version
 
 2936   std::size_t 
Read( std::size_t, 
void* ); 
 
 2937   std::size_t 
Write( std::size_t, 
const void* );
 
 2942   const unsigned char* m_buffer;
 
 2943   std::size_t m_sizeof_buffer;
 
 2944   std::size_t m_buffer_position;
 
 2945   ON__INT_PTR m_reserved1;
 
 2946   ON__INT_PTR m_reserved2;
 
 2947   ON__INT_PTR m_reserved3;
 
 2948   ON__INT_PTR m_reserved4;
 
 2979     std::size_t initial_sizeof_buffer, 
 
 2980     std::size_t max_sizeof_buffer, 
 
 2981     int archive_3dm_version,
 
 2982     int archive_opennurbs_version
 
 3027   std::size_t 
Read( std::size_t, 
void* ); 
 
 3028   std::size_t 
Write( std::size_t, 
const void* ); 
 
 3032   void AllocBuffer(std::size_t);
 
 3034   unsigned char* m_buffer;
 
 3035   std::size_t m_sizeof_buffer;
 
 3036   const std::size_t m_max_sizeof_buffer;
 
 3037   std::size_t m_sizeof_archive;
 
 3038   std::size_t m_buffer_position;
 
 3039   ON__INT_PTR m_reserved1;
 
 3040   ON__INT_PTR m_reserved2;
 
 3041   ON__INT_PTR m_reserved3;
 
 3042   ON__INT_PTR m_reserved4;
 
 3081 bool ON_WriteOneObjectArchive( 
 
ON_3dmGoo(const ON_3dmGoo &)
void Dump(ON_TextLog &) const
ON_3dmGoo & operator=(const ON_3dmGoo &)
ON_Buffer * Buffer() const
bool SeekFromEnd(ON__INT64)
bool SeekFromStart(std::size_t)
std::size_t Write(std::size_t, const void *)
virtual ~ON_BinaryArchiveBuffer()
bool SeekFromCurrentPosition(int)
ON_BinaryArchiveBuffer(ON::archive_mode, ON_Buffer *buffer)
std::size_t CurrentPosition() const
bool SetBuffer(ON_Buffer *buffer)
std::size_t Read(std::size_t, void *)
int GetCurrentChunk(ON_3DM_CHUNK &chunk) const
bool Write3dmGoo(const ON_3dmGoo &)
int Read3dmFont(ON_Font **)
bool WriteArray(const ON_SimpleArray< class ON_ClippingPlaneInfo > &)
int ReadObject(ON_Object **ppObject)
bool ReadArray(ON_SimpleArray< float > &)
bool BigSeekBackward(ON__UINT64 offset)
virtual std::size_t Write(std::size_t, const void *)=0
bool WriteVector(const ON_3dVector &)
ON_DEPRECATED bool BeginRead3dmChunk(unsigned int *, int *)
bool EndRead3dmDimStyleTable()
bool WriteShort(std::size_t, const short *)
bool WriteLong(unsigned long)
bool EndReadDictionaryEntry()
bool WritePoint(const ON_3dPoint &)
int Read3dmBitmap(ON_Bitmap **)
int Read3dmLight(ON_Light **, ON_3dmObjectAttributes *)
int Read3dmObject(ON_Object **, ON_3dmObjectAttributes *, unsigned int=0)
bool EnableCRCCalculation(bool bEnable)
bool Write3dmMaterial(const ON_Material &)
bool ReadStringUTF8ElementCount(std::size_t *string_utf8_element_count)
bool ReadBigInt(std::size_t, ON__UINT64 *)
bool WriteArray(int count, const class ON_Layer *)
ON_BinaryArchive(ON::archive_mode)
bool ReadArray(ON_ClassArray< ON_wString > &)
bool ReadShort(std::size_t, unsigned short *)
bool EndWrite3dmGroupTable()
bool WriteArray(const ON_SimpleArray< ON_2dPoint > &)
bool BeginWrite3dmDimStyleTable()
bool BeginWriteDictionary(ON_UUID dictionary_id, unsigned int version, const wchar_t *dictionary_name)
bool WriteBigTime(time_t)
bool WriteShort(unsigned short)
bool WriteBigInt(ON__INT64)
bool ReadArray(ON_SimpleArray< ON_2dPoint > &)
bool Save3dmRenderMeshes() const
bool BeginRead3dmGroupTable()
bool BigSeekForward(ON__UINT64 offset)
bool EndWrite3dmFontTable()
int Read3dmDimStyle(ON_DimStyle **)
bool EndRead3dmLinetypeTable()
bool WriteArray(const ON_SimpleArray< ON_3dPoint > &)
bool WriteSize(std::size_t)
virtual bool SeekFromStart(std::size_t)=0
bool EndWrite3dmUserTable()
bool WriteDisplayMaterialRef(const ON_DisplayMaterialRef &)
bool ReadComponentIndex(ON_COMPONENT_INDEX &)
int Read3dmHistoryRecord(class ON_HistoryRecord *&)
bool ReadArray(ON_SimpleArray< short > &)
static const char * TypecodeName(unsigned int tcode)
bool EndRead3dmBitmapTable()
bool ReadArray(ON_SimpleArray< class ON_ClippingPlaneInfo > &)
bool WriteObject(const ON_Object &)
bool BigSeekFromStart(ON__UINT64 offset)
bool WriteTime(const struct tm &)
bool WriteArray(const ON_SimpleArray< ON_2fVector > &)
bool EnableSave3dmAnalysisMeshes(ON_BOOL32=true)
bool WriteBigInt(ON__UINT64)
static int CurrentArchiveVersion()
bool WriteLong(std::size_t, const long *)
bool ReadArray(ON_ClassArray< ON_MappingRef > &)
bool WriteShort(std::size_t, const unsigned short *)
bool WriteArray(const ON_SimpleArray< ON_Color > &)
bool WriteChar(unsigned char)
bool WriteDouble(std::size_t, const double *)
bool ReadV1_TCODE_RHINOIO_OBJECT_BREP(ON_Object **, ON_3dmObjectAttributes *)
bool WriteArray(const ON_SimpleArray< int > &)
ON_DEPRECATED bool Write3dmAnonymousUserTable(const ON_3dmGoo &)
bool EndWrite3dmInstanceDefinitionTable()
bool ReadPoint(ON_3dPoint &)
int Read3dmTextureMapping(ON_TextureMapping **)
bool ReadDouble(double *)
bool WriteObject(const ON_Object *)
bool WriteComponentIndex(const ON_COMPONENT_INDEX &)
bool WriteArray(const ON_SimpleArray< double > &)
bool Seek3dmChunkFromStart(unsigned int)
bool ReadCompressedBuffer(std::size_t sizeof__outbuffer, void *outbuffer, int *bFailedCRC)
bool ReadPlane(ON_Plane &)
bool BeginRead3dmLightTable()
int Read3dmLinetype(ON_Linetype **)
bool ReadPoint(ON_4dPoint &)
bool WriteLinetypeSegment(const ON_LinetypeSegment &)
bool WriteArray(const ON_SimpleArray< ON_Xform > &)
bool WriteArray(const ON_SimpleArray< ON_UuidIndex > &)
bool BeginWrite3dmBigChunk(ON__UINT32 typecode, ON__INT64 value)
bool EndRead3dmObjectTable()
bool BeginWrite3dmGroupTable()
bool BeginWrite3dmHistoryRecordTable()
virtual bool AtEnd() const =0
bool WriteXform(const ON_Xform &)
bool EndWrite3dmLayerTable()
bool BeginRead3dmTextureMappingTable()
bool Write3dmLinetype(const ON_Linetype &)
bool ReadChar(std::size_t, char *)
bool WriteBigSize(std::size_t)
bool WriteByte(std::size_t, const void *)
unsigned int Dump3dmChunk(ON_TextLog &text_log, int recursion_depth=0)
bool Write3dmBitmap(const ON_Bitmap &)
bool ReadVector(ON_3dVector &)
bool ReadArray(ON_SimpleArray< ON_3fVector > &)
bool ReadInt(std::size_t, unsigned int *)
bool ReadArray(ON_SimpleArray< ON_LinetypeSegment > &)
bool WriteArray(const ON_SimpleArray< ON_MappingChannel > &)
int Read3dmHatchPattern(ON_HatchPattern **)
bool BeginWrite3dmLayerTable()
bool EndWrite3dmHistoryRecordTable()
bool BeginWrite3dmHatchPatternTable()
bool ReadV1_TCODE_MESH_OBJECT(ON_Object **, ON_3dmObjectAttributes *)
bool EndRead3dmHistoryRecordTable()
bool BeginWrite3dmBitmapTable()
bool Read3dmAnonymousUserTable(int archive_3dm_version, int archive_opennurbs_version, ON_3dmGoo &goo)
bool ReadString(ON_wString &s)
bool Read3dmProperties(ON_3dmProperties &)
bool WriteArray(const ON_SimpleArray< ON_DisplayMaterialRef > &)
ON_DEPRECATED bool BeginWrite3dmUserTable(const ON_UUID &)
bool WriteArray(const ON_SimpleArray< ON_LinetypeSegment > &)
bool ReadFloat(std::size_t, float *)
bool BeginRead3dmUserTable(ON_UUID &plugin_id, bool *bLastSavedAsGoo, int *archive_3dm_version, int *archive_opennurbs_version)
bool Write3dmInstanceDefinition(const ON_InstanceDefinition &)
ON_DEPRECATED bool ReadStringSize(std::size_t *str_array_count)
bool Read3dmEndMark(std::size_t *)
bool WriteBoundingBox(const ON_BoundingBox &)
bool EndWrite3dmHatchPatternTable()
bool Read3dmGoo(ON_3dmGoo &)
bool WriteColor(const ON_Color &)
virtual std::size_t Read(std::size_t, void *)=0
bool ReadArray(ON_SimpleArray< class ON_Layer * > &)
bool WriteArray(const ON_ClassArray< ON_wString > &)
int GetCurrentChunk(ON_3DM_BIG_CHUNK &big_chunk) const
bool ReadBigSize(std::size_t *)
bool EndWriteDictionaryEntry()
bool WriteString(const ON_String &sUTF8)
bool BeginRead3dmInstanceDefinitionTable()
bool WriteArray(const ON_SimpleArray< ON_3fPoint > &)
bool ReadArray(ON_SimpleArray< bool > &)
bool EndRead3dmMaterialTable()
bool WriteString(const char *sUTF8)
bool EndRead3dmHatchPatternTable()
ON::endian Endian() const
bool EndWrite3dmBitmapTable()
bool ReadString(ON_String &sUTF8)
bool BeginWrite3dmUserTable(const ON_UUID &plugin_id, bool bSavingGoo, int goo_3dm_version, int goo_opennurbs_version)
virtual bool SeekFromCurrentPosition(int)=0
virtual ~ON_BinaryArchive()
bool BeginWrite3dmMaterialTable()
bool ReadArray(ON_SimpleArray< double > &)
bool ReadString(std::size_t str_array_count, char *str_array)
bool WriteLong(std::size_t, const unsigned long *)
bool BigSeekFromCurrentPosition(ON__INT64 offset)
bool BeginWriteDictionaryEntry(int de_type, const wchar_t *entry_name)
bool ReadChar(std::size_t, unsigned char *)
bool ReadInt(unsigned int *)
bool ReadInt(std::size_t, int *)
bool WritePlane(const ON_Plane &)
bool WriteArray(int count, const class ON_Layer *const *)
bool ReadArray(ON_SimpleArray< ON_2fVector > &)
bool WritePlaneEquation(const ON_PlaneEquation &)
bool BeginWrite3dmChunk(unsigned int tcode, int major_version, int minor_version)
bool SaveUserData() const
bool Seek3dmChunkFromCurrentPosition(unsigned int)
bool WriteArray(const ON_SimpleArray< ON_3fVector > &)
bool BeginRead3dmBitmapTable()
ON__UINT64 ReadBuffer(ON__UINT64 sizeof_buffer, void *buffer)
bool WriteInt(std::size_t, const unsigned int *)
bool ReadStringUTF16ElementCount(std::size_t *string_utf16_element_count)
bool Read3dmSettings(ON_3dmSettings &)
bool EndWrite3dmLinetypeTable()
bool WriteArray(const ON_ClassArray< ON_String > &)
ON_DEPRECATED bool PeekAt3dmChunkType(unsigned int *, int *)
bool ReadBigInt(std::size_t, ON__INT64 *)
bool EndRead3dmLightTable()
bool ReadArray(ON_SimpleArray< ON_MappingChannel > &)
bool ReadArray(ON_SimpleArray< ON_2fPoint > &)
bool ReadBoundingBox(ON_BoundingBox &)
bool ReadArray(ON_SimpleArray< ON_4dPoint > &)
unsigned int ErrorMessageMask() const
bool WriteInt(std::size_t, const int *)
bool ReadLong(std::size_t, unsigned long *)
bool WriteArray(const ON_ClassArray< class ON_ObjRef > &)
bool BeginRead3dmLayerTable()
bool ReadBigInt(ON__UINT64 *)
bool ReadObjectUserData(ON_Object &object)
bool WriteBigInt(std::size_t, const ON__UINT64 *)
bool EndWrite3dmMaterialTable()
bool ReadArray(ON_ObjectArray< class ON_Layer > &)
bool EndRead3dmChunk(bool bSupressPartiallyReadChunkWarning)
bool EndRead3dmFontTable()
bool ReadColor(ON_Color &)
bool WriteObjectUserData(const ON_Object &object)
bool WriteArray(const ON_SimpleArray< bool > &)
bool WriteArray(const ON_SimpleArray< short > &)
bool ReadPoint(ON_2dPoint &)
bool WriteArray(const ON_SimpleArray< ON_4fPoint > &)
bool BeginWrite3dmLightTable()
bool EndWrite3dmLightTable()
ON_DEPRECATED bool Read3dmAnonymousUserTable(ON_3dmGoo &)
bool EndWrite3dmTextureMappingTable()
bool ReadArray(ON_SimpleArray< ON_Xform > &)
bool Read3dmStartSection(int *version, ON_String &sStartSectionComment)
bool EndWriteDictionary()
bool MaskReadError(ON__UINT64 sizeof_request, ON__UINT64 sizeof_read) const
bool WriteInterval(const ON_Interval &)
bool Save3dmAnalysisMeshes() const
bool ReadArray(ON_SimpleArray< ON_4fPoint > &)
bool ReadString(std::size_t str_array_count, unsigned char *str_array)
bool EndRead3dmUserTable()
bool Write3dmGroup(const ON_Group &)
int BeginReadDictionaryEntry(int *de_type, ON_wString &entry_name)
bool BeginRead3dmMaterialTable()
bool ReadLinetypeSegment(ON_LinetypeSegment &)
bool BeginWrite3dmTextureMappingTable()
int Read3dmLayer(ON_Layer **)
bool WriteArray(const ON_SimpleArray< ON_3dVector > &)
friend void ON_SetBinaryArchiveOpenNURBSVersion(ON_BinaryArchive &, int)
bool SetArchive3dmVersion(int)
bool ReadShort(unsigned short *)
bool WriteArray(const ON_SimpleArray< class ON_ObjRef_IRefID > &)
bool ReadVector(ON_2dVector &)
bool Write3dmDimStyle(const ON_DimStyle &)
bool WriteArray(const ON_SimpleArray< ON_UUID > &)
bool Write3dmLayer(const ON_Layer &)
bool ReadPlaneEquation(ON_PlaneEquation &)
bool ReadCompressedBufferSize(std::size_t *sizeof__outbuffer)
int Read3dmInstanceDefinition(ON_InstanceDefinition **)
bool ReadArray(ON_SimpleArray< class ON_ObjRef_IRefID > &)
bool Write3dmFont(const ON_Font &)
bool WriteCircle(const ON_Circle &)
bool ReadArray(ON_SimpleArray< ON_2dVector > &)
bool WriteBigInt(std::size_t, const ON__INT64 *)
bool WriteArray(const ON_SimpleArray< ON_4dPoint > &)
bool Write3dmProperties(const ON_3dmProperties &)
bool ReadCircle(ON_Circle &)
bool WriteCompressedBuffer(std::size_t sizeof__inbuffer, const void *inbuffer)
bool Write3dmHistoryRecord(const class ON_HistoryRecord &)
bool BeginRead3dmObjectTable()
bool BeginRead3dmLinetypeTable()
bool WriteArray(const ON_SimpleArray< ON_2fPoint > &)
bool ReadArray(ON_SimpleArray< ON_3dPoint > &)
bool ReadArray(ON_SimpleArray< ON_SurfaceCurvature > &)
bool BeginRead3dmChunk(unsigned int expected_tcode, int *major_version, int *minor_version)
bool ReadV1_TCODE_LEGACY_FAC(ON_Object **, ON_3dmObjectAttributes *)
bool ReadLong(unsigned long *)
static char * ON_TypecodeParse(unsigned int tcode, char *typecode_name, std::size_t max_length)
bool ReadV1_TCODE_LEGACY_CRV(ON_Object **, ON_3dmObjectAttributes *)
bool WriteString(const unsigned short *sUTF16)
bool WriteArray(const ON_SimpleArray< char > &)
bool ReadV1_TCODE_RH_POINT(ON_Object **, ON_3dmObjectAttributes *)
bool WriteArray(const ON_ClassArray< ON_MaterialRef > &)
bool Write3dmHatchPattern(const ON_HatchPattern &)
bool ReadV1_TCODE_LEGACY_SHL(ON_Object **, ON_3dmObjectAttributes *)
bool ReadArray(ON_ClassArray< class ON_ObjRef > &)
bool BeginWrite3dmObjectTable()
bool ReadXform(ON_Xform &)
static bool ToggleByteOrder(int, int, const void *, void *)
virtual int LoadUserDataApplication(ON_UUID)
bool WriteVector(const ON_2dVector &)
bool BeginRead3dmFontTable()
bool ReadArray(ON_SimpleArray< ON_3fPoint > &)
bool ReadInterval(ON_Interval &)
bool ReadArray(ON_SimpleArray< char > &)
bool Write3dmAnonymousUserTableRecord(const ON_UUID &plugin_id, int goo_3dm_version, int goo_opennurbs_version, const ON_3dmGoo &goo)
bool ReadLong(std::size_t, long *)
bool ReadTime(struct tm &)
bool PeekAt3dmBigChunkType(ON__UINT32 *typecode, ON__INT64 *big_value)
bool WriteArray(const ON_SimpleArray< ON_2dVector > &)
bool ReadChar(unsigned char *)
bool WritePoint(const ON_4dPoint &)
bool BeginRead3dmHistoryRecordTable()
int ReadObject(ON_Object &object)
bool EnableSave3dmRenderMeshes(ON_BOOL32=true)
bool Write3dmChunkVersion(int, int)
bool ReadShort(std::size_t, short *)
bool ReadBigTime(time_t *)
bool WriteString(const ON_wString &s)
bool ReadByte(std::size_t, void *)
std::size_t SizeofChunkLength() const
bool WriteFloat(std::size_t, const float *)
bool WriteString(const unsigned char *sUTF8)
ON_DEPRECATED bool BeginRead3dmUserTable(ON_UUID &)
int Read3dmGroup(ON_Group **)
bool EndWrite3dmObjectTable()
bool BeginWrite3dmLinetypeTable()
bool ReadArray(ON_SimpleArray< int > &)
bool ReadArray(ON_SimpleArray< ON_DisplayMaterialRef > &)
int ArchiveOpenNURBSVersion() const
bool EndRead3dmInstanceDefinitionTable()
bool EnableSaveUserData(ON_BOOL32=true)
bool Write3dmLight(const ON_Light &, const ON_3dmObjectAttributes *)
bool Read3dmChunkVersion(int *, int *)
bool Write3dmTextureMapping(const ON_TextureMapping &)
bool WriteArc(const ON_Arc &)
bool ReadArray(ON_SimpleArray< ON_Color > &)
std::size_t ArchiveStartOffset() const
bool BeginWrite3dmChunk(unsigned int, int)
bool WriteArray(const ON_SimpleArray< ON_SurfaceCurvature > &)
bool WriteUuid(const ON_UUID &)
bool BeginWrite3dmFontTable()
bool ReadV1_TCODE_RHINOIO_OBJECT_NURBS_CURVE(ON_Object **, ON_3dmObjectAttributes *)
bool ReadV1_TCODE_RHINOIO_OBJECT_NURBS_SURFACE(ON_Object **, ON_3dmObjectAttributes *)
bool WritePoint(const ON_2dPoint &)
bool ReadArray(ON_ClassArray< ON_MaterialRef > &)
bool ReadSize(std::size_t *)
bool BeginWrite3dmInstanceDefinitionTable()
bool WriteInt(unsigned int)
bool ReadArray(ON_SimpleArray< ON_UuidIndex > &)
bool EndRead3dmLayerTable()
int Archive3dmVersion() const
bool ReadBigInt(ON__INT64 *)
bool Write3dmObject(const ON_Object &, const ON_3dmObjectAttributes *)
bool BeginRead3dmHatchPatternTable()
bool Write3dmStartSection(int version, const char *sStartSectionComment)
bool ReadArray(ON_SimpleArray< ON_3dVector > &)
bool BeginReadDictionary(ON_UUID *dictionary_id, unsigned int *version, ON_wString &dictionary_name)
bool FindTableInDamagedArchive(unsigned int tcode_table, unsigned int tcode_record, ON_UUID class_uuid, int min_length_data)
bool ReadV1_TCODE_ANNOTATION(unsigned int, ON_Object **, ON_3dmObjectAttributes *)
bool ReadString(std::size_t str_array_count, unsigned short *str_array)
bool EndRead3dmTextureMappingTable()
bool EndRead3dmGroupTable()
bool WriteChar(std::size_t, const unsigned char *)
bool ReadArray(ON_ClassArray< ON_String > &)
bool Write3dmSettings(const ON_3dmSettings &)
bool ReadDisplayMaterialRef(ON_DisplayMaterialRef &)
bool WriteArray(const ON_SimpleArray< float > &)
bool WriteChar(std::size_t, const char *)
bool WriteLine(const ON_Line &)
virtual std::size_t CurrentPosition() const =0
bool ReadDouble(std::size_t, double *)
bool WriteArray(const ON_ClassArray< ON_MappingRef > &)
bool ReadArray(ON_SimpleArray< ON_UUID > &)
bool BeginRead3dmDimStyleTable()
bool BeginRead3dmBigChunk(unsigned int *, ON__INT64 *)
bool EndWrite3dmDimStyleTable()
int Read3dmMaterial(ON_Material **)
@ instance_definition_table
ON_BinaryFile(ON::archive_mode, FILE *fp)
std::size_t CurrentPosition() const
std::size_t Read(std::size_t, void *)
void EnableMemoryBuffer(int=16384)
std::size_t Write(std::size_t, const void *)
bool SeekFromStart(std::size_t)
ON_BinaryFile(ON::archive_mode)
bool SeekFromCurrentPosition(int)
ON_Buffer(const ON_Buffer &src)
static int Compare(const ON_Buffer &a, const ON_Buffer &b)
void SetErrorHandler(ON_Buffer_ErrorHandler error_handler)
bool Uncompress(ON_Buffer &uncompressed_buffer) const
ON__UINT32 LastError() const
bool IsValid(const ON_TextLog *text_log) const
ON__UINT32 CRC32(ON__UINT32 current_remainder) const
bool WriteToBinaryArchive(ON_BinaryArchive &) const
ON__UINT64 Write(ON__UINT64 size, const void *buffer)
ON_Buffer & operator=(const ON_Buffer &src)
bool Compress(ON_Buffer &compressed_buffer) const
bool ReadFromBinaryArchive(ON_BinaryArchive &)
ON__UINT64 CurrentPosition() const
bool Seek(ON__INT64 offset, int origin)
bool SeekFromEnd(ON__INT64 offset)
bool SeekFromStart(ON__INT64 offset)
bool ChangeSize(ON__UINT64 buffer_size)
ON__UINT64 Read(ON__UINT64 size, void *buffer)
bool SeekFromCurrentPosition(ON__INT64 offset)
ON_Buffer_ErrorHandler ErrorHandler() const
ON__UINT64 CurrentFileLastAccessTime() const
const wchar_t * CurrentFileName() const
bool GetCurrentFullPathFileName(ON_wString &filename) const
const wchar_t * NextFile()
const wchar_t * FirstFile(const wchar_t *directory_name, const wchar_t *file_name_filter)
ON__UINT64 CurrentFileCreateTime() const
ON__UINT64 CurrentFileSize() const
const wchar_t * FirstFile(const char *directory_name, const char *file_name_filter)
bool CurrentFileIsHidden() const
ON__UINT64 CurrentFileLastModifiedTime() const
bool CurrentFileIsDirectory() const
static FILE * Open(const wchar_t *filename, const wchar_t *mode)
static bool GetFileInformation(FILE *fp, ON__UINT64 *file_size, ON__UINT64 *file_create_time, ON__UINT64 *file_last_modified_time)
static bool SeekFromEnd(FILE *fp, ON__INT64 offset)
static ON__UINT64 Read(FILE *fp, ON__UINT64 count, void *buffer)
static bool SeekFromCurrentPosition(FILE *fp, ON__INT64 offset)
static ON__UINT64 Write(FILE *fp, ON__UINT64 count, const void *buffer)
static int Close(FILE *fp)
static bool Flush(FILE *fp)
static bool Seek(FILE *fp, ON__INT64 offset, int orgin)
static bool SeekFromStart(FILE *fp, ON__INT64 offset)
static FILE * Open(const char *filename, const char *mode)
static ON__INT64 CurrentPosition(FILE *fp)
ON_Read3dmBufferArchive(std::size_t sizeof_buffer, const void *buffer, bool bCopyBuffer, int archive_3dm_version, int archive_opennurbs_version)
std::size_t Read(std::size_t, void *)
std::size_t CurrentPosition() const
bool SeekFromCurrentPosition(int)
~ON_Read3dmBufferArchive()
std::size_t SizeOfBuffer() const
bool SeekFromStart(std::size_t)
const void * Buffer() const
std::size_t Write(std::size_t, const void *)
std::size_t CurrentPosition() const
bool SeekFromStart(std::size_t)
std::size_t Read(std::size_t, void *)
bool SeekFromCurrentPosition(int)
std::size_t Write(std::size_t, const void *)
ON_Write3dmBufferArchive(std::size_t initial_sizeof_buffer, std::size_t max_sizeof_buffer, int archive_3dm_version, int archive_opennurbs_version)
const void * Buffer() const
~ON_Write3dmBufferArchive()
std::size_t SizeOfBuffer() const
std::size_t SizeOfArchive() const
ON__UINT64 Length() const