GeometricObjects CATCGMStream
Usage: you must use this class as is. You should never derive it.
public class CATCGMStream
Class defining the stream to use for the stream and unstream of a single geometric object.
Role: This stream class is specially designed to deal with a list of linked objects.
The list of linked objects must be written/read prior to any other write/read operation.
This class is used when you define the stream or unstream of your own CGM attribute, but you only has
to use it as a CATMathStream. In fact, if you have linked objects, use , and the stream/unstream of your linked objects will be automatic.
- See also:
-
Constructor and Destructor Index
- o
CATCGMStream(CATCGMStreamImpl*)
- Constructs CATCGMStream for stream operation (read and write acces are allowed).
- o
CATCGMStream(istream&,CATCGMStreamImpl*)
- Constructs CATCGMStream for read only stream operation.
- o
CATCGMStream(void*,size_t,CATCGMStreamImpl*)
- Constructs CATCGMStream for read only stream operation.
- o
CATCGMStream(ostream&,size_t,CATBoolean,CATCGMStreamImpl*)
- Constructs CATCGMStream for write only stream operation.
- o
CATCGMStream(char*,CATCGMStreamType,CATBoolean,CATCGMStreamImpl*)
- Constructs CATCGMStream for read only or write only stream operation.
- o
CATCGMStream(size_t,CATCGMStreamType,CATBoolean,CATCGMStreamImpl*)
- Constructs CATCGMStream for stream operation.
- o
~CATCGMStream()
- Destructor
Method Index
- o
CloseFactoryForRead(size_t,short,CATBoolean)
- Closes the stream after reading of the content of a CATGeoFactory.
- o
CloseFactoryForWrite(size_t,short,CATBoolean)
- Closes the stream after writing of the content of a CATGeoFactory.
- o
GetAssociatedContainer()
- Returns the CATGeoFactory used with a OpenFactoryForWrite/CloseFactoryForWrite or OpenFactoryForRead/CloseFactoryForRead operation.
- o
GetNumberOfBytesToRead()
- Returns the number of bytes that remains to read.
- o
OpenFactoryForRead(CATICGMContainer*,size_t&,short&,CATBoolean)
- Opens the stream for reading the content of a CATGeoFactory.
- o
OpenFactoryForWrite(CATICGMContainer*,size_t&,short&,CATBoolean)
- Opens the stream for writing the content of a CATGeoFactory.
- o
PrepareToObjectStreaming()
- Prepares the object streaming.
- o
PrepareToObjectUnstreaming()
- Prepares the object unstreaming.
- o
PrepareToProcessAnObject(size_t)
- Prepares the stream to process an object.
- o
ReadCrvLimits(CATCrvLimits&,CATCurve*,char[])
- Reads a CATCrvLimits.
- o
ReadCrvParam(CATCrvParam&,CATCurve*,char[])
- Reads a CATCrvParam.
- o
ReadGeometryV5(CATICGMObject**,CATLONG32,char[])
- Read an array of CGM objects.
- o
ReadKnotVector(CATKnotVector&,char[])
- Reads a CATKnotVector.
- o
ReadLinkedObjectsCount(CATULONG32&)
- Reads the linked objects count.
- o
ReadListOfLinkedObjects(CATLISTP(CATICGMObject)&,char[])
- Reads the total list of linked objects.
- o
ReadObject(CATICGMObject*&,char[])
- Reads a linked object.
- o
ReadSurLimits(CATSurLimits&,CATSurface*,char[])
- Reads a CATSurLimits.
- o
ReadSurParam(CATSurParam&,CATSurface*,char[])
- Reads a CATSurParam.
- o
ResetToRawBehaviour()
- Resets the stream to raw behaviour.
- o
SkipRemainingInformationsToRead()
- Skips over remaining informations to read.
- o
SkipRemainingLinkedObjectsToRead()
- Skips over remaining linked objects to read.
- o
WriteCrvLimits(CATCrvLimits&,char[])
- Writes a CATCrvLimits.
- o
WriteCrvParam(CATCrvParam&,char[])
- Writes a CATCrvParam.
- o
WriteGeometryV5(CATICGMObject**,CATLONG32,char[])
- Writes an array of CGM objects.
- o
WriteKnotVector(CATKnotVector&,char[])
- Writes a CATKnotVector.
- o
WriteLinkedObjectsCount(CATULONG32)
- Writes the linked objects count.
- o
WriteListOfLinkedObjects(CATLISTP(CATICGMObject)&,char[])
- Writes a (partial or total) list of linked objects.
- o
WriteObject(CATICGMObject*,char[])
- Writes a linked object.
- o
WriteSurLimits(CATSurLimits&,char[])
- Writes a CATSurLimits.
- o
WriteSurParam(CATSurParam&,char[])
- Writes a CATSurParam.
Constructor and Destructor
o CATCGMStream
public CATCGMStream( | | ipImpl | = NULL) |
-
Constructs CATCGMStream for stream operation (read and write acces are allowed).
- Parameters:
-
- CATCGMStreamImpl
- Internal use only. Do not change the default value.
o CATCGMStream
public CATCGMStream( | | ioFile, |
| | ipImpl | = NULL) |
-
Constructs CATCGMStream for read only stream operation.
- Parameters:
-
- ioFile
- The stream from which the stream is read.
The first acces of the stream may be done with OpenWriteStreamHeader.
The last acces of the stream may be done with CloseWriteStreamHeader.
- CATCGMStreamImpl
- Internal use only. Do not change the default value.
o CATCGMStream
public CATCGMStream( | | iBuffer, |
| | iSizeBuffer, |
| | ipImpl | = NULL) |
-
Constructs CATCGMStream for read only stream operation.
- Parameters:
-
- iBuffer
- The memory area directly acceded for the read operation.
- iSizeBuffer
- The size in bytes of iBuffer.
- CATCGMStreamImpl
- Internal use only. Do not change the default value.
o CATCGMStream
public CATCGMStream( | | ioFile, |
| | iInitialNumberOfBytes | = 0, |
| const | iEnableByAddress | = FALSE, |
| | ipImpl | = NULL) |
-
Constructs CATCGMStream for write only stream operation.
- Parameters:
-
- ioFile
- The stream on which the stream is saved.
- iInitialNumberOfBytes
- The initial memory size of internal buffer in bytes.
The first acces of the stream may be done with OpenReadStreamHeader.
The last acces of the stream may be done with CloseReadStreamHeader.
- CATCGMStreamImpl
- Internal use only. Do not change the default value.
o CATCGMStream
public CATCGMStream( | const | iFilename, |
| const | iAcces, |
| const | iEnableByAddress | = FALSE, |
| | ipImpl | = NULL) |
-
Constructs CATCGMStream for read only or write only stream operation.
- Parameters:
-
- ioFile
- The stream from which the stream is read.
- iAcces
- The kind of acces allowed on the CATCGMStream.
The first acces of the stream may be done with OpenReadStreamHeader or OpenWriteStreamHeader.
The last acces of the stream may be done with CloseReadStreamHeader or CloseWriteStreamHeader.
- CATCGMStreamImpl
- Internal use only. Do not change the default value.
o CATCGMStream
public CATCGMStream( | | iInitialNumberOfBytes, |
| const | iAcces, |
| const | iEnableByAddress | = FALSE, |
| | ipImpl | = NULL) |
-
Constructs CATCGMStream for stream operation.
- Parameters:
-
- iInitialNumberOfBytes
- The initial number of bytes for internal buffer.
- iAcces
- The kind of acces allowed on the CATCGMStream.
- CATCGMStreamImpl
- Internal use only. Do not change the default value.
o ~CATCGMStream
public virtual ~CATCGMStream( | ) |
-
Destructor
Methods
o CloseFactoryForRead
public CloseFactoryForRead( | const | iWhere, |
| const | iLevel, |
| | iForExternalWeakLinks | = FALSE) |
-
Closes the stream after reading of the content of a CATGeoFactory.
- Parameters:
-
- iWhere
- internal parameter given by OpenFactoryForRead.
- iLevel
- internal parameter given by OpenFactoryForRead.
- iForExternalWeakLinks
- Internal use only. Do not change the default value.
o CloseFactoryForWrite
public CloseFactoryForWrite( | const | iWhere, |
| const | iLevel, |
| | iForExternalWeakLinks | = FALSE) |
-
Closes the stream after writing of the content of a CATGeoFactory.
- Parameters:
-
- iWhere
- internal parameter given by OpenFactoryForWrite.
- iLevel
- internal parameter given by OpenFactoryForWrite.
- iForExternalWeakLinks
- Internal use only. Do not change the default value.
o GetAssociatedContainer
public GetAssociatedContainer( | ) |
-
Returns the CATGeoFactory used with a OpenFactoryForWrite/CloseFactoryForWrite or OpenFactoryForRead/CloseFactoryForRead operation.
- Returns:
- A CATICGMContainer pointer to the associated CATGeoFactory.
o GetNumberOfBytesToRead
public GetNumberOfBytesToRead( | ) |
-
Returns the number of bytes that remains to read.
- Returns:
- The number of bytes still to read, considering what has been already read
o OpenFactoryForRead
public OpenFactoryForRead( | | iFactory, |
| | oWhere, |
| | oLevel, |
| | iForExternalWeakLinks | = FALSE) |
-
Opens the stream for reading the content of a CATGeoFactory.
- Parameters:
-
- iFactory
- A pointer to the CATGeoFactory to be read.
- oWhere
- internal parameter you must give back to CloseFactoryForRead.
- oLevel
- internal parameter you must give back to CloseFactoryForRead.
- iForExternalWeakLinks
- Internal use only. Do not change the default value.
o OpenFactoryForWrite
public OpenFactoryForWrite( | | iFactory, |
| | oWhere, |
| | oLevel, |
| | iForExternalWeakLinks | = FALSE) |
-
Opens the stream for writing the content of a CATGeoFactory.
- Parameters:
-
- iFactory
- A pointer to the CATGeoFactory to be written.
- oWhere
- internal parameter you must give back to CloseFactoryForWrite.
- oLevel
- internal parameter you must give back to CloseFactoryForWrite.
- iForExternalWeakLinks
- Internal use only. Do not change the default value.
o PrepareToObjectStreaming
public PrepareToObjectStreaming( | ) |
-
Prepares the object streaming.
This function forces the order of write operations:
- Indicates the linked objects count for the objects to stream.
(thru a call to WriteLinkedObjectsCount)
This step is mandatory, even if there is no link.
- Writes the list of linked objects for object to be streamed, combining :
- call(s) to WriteListOfLinkedObjects,
- call(s) to WriteObject.
- Write other informations (numbers and strings).
It must be called anytime, even if there is no link. (use an empty list in such case)
o PrepareToObjectUnstreaming
public PrepareToObjectUnstreaming( | ) |
-
Prepares the object unstreaming.
This function will force the order of read operations:
- Gets the linked objects for the objects to unstream:
- Either read the linked objects count for object to be streamed.
(in one shot, thru a call to 'ReadListOfLinkedObjects').
Extract then only what you need: Do not make any assumptions on list's size,
as upcoming versions may add later linked objects to the modelization.
- Either read the count, then read individually each linked object.
You must forecast to skip linked objects possibly added by upcoming versions.
(thru a call to 'ReadLinkedObjectsCount',
followed by as many calls as required to 'ReadObject',
ended by a call to 'SkipRemainingLinkedObjectsToRead').
This step is mandatory, even if there is no link.
- Read other informations (numbers and strings).
It must be called anytime, even if there is no link. (use an empty list in such case)
o PrepareToProcessAnObject
public PrepareToProcessAnObject( | | iObjectSize | = 0) |
-
Prepares the stream to process an object.
This resets the flags that control the order of read/write operations.
It must be called before streaming/unstreaming an object.
- Parameters:
-
- iObjectSize
- The size of the object to be unstreamed (useless when streaming).
o ReadCrvLimits
public ReadCrvLimits( | | ioCrvLimits, |
| | ipCurve, |
| const | iLabelReserved | = "") |
-
Reads a CATCrvLimits.
- Parameters:
-
- ioCrvLimits
- The read CATCrvLimits.
- ipCurve
- The CATCurve with which the CATCrvLimits is associated.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o ReadCrvParam
public ReadCrvParam( | | ioCrvParam, |
| | ipCurve, |
| const | iLabelReserved | = "") |
-
Reads a CATCrvParam.
- Parameters:
-
- ioCrvParam
- The read CATCrvParam.
- ipCurve
- The CATCurve with which the CATCrvParam is associated.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o ReadGeometryV5
public ReadGeometryV5( | | geometry, |
| const | iNbGeometry, |
| const | iReservedLabel | = "") |
-
Read an array of CGM objects.
- Parameters:
-
- geometry
- A pointer to the array of read CATICGMObjects.
- iNbGeometry
- The number of CATICGMObjects to read.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o ReadKnotVector
public ReadKnotVector( | | ioKnotVector, |
| const | iLabelReserved | = "") |
-
Reads a CATKnotVector.
- Parameters:
-
- ioKnotVector
- The read CATKnotVector.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o ReadLinkedObjectsCount
public ReadLinkedObjectsCount( | | ioLinkedObjectsCount) |
-
Reads the linked objects count.
- Parameters:
-
- ioLinkedObjectsCount
- The number of linked objects that are requsted by this.
o ReadListOfLinkedObjects
public ReadListOfLinkedObjects( | | ioLinkedObjects, |
| const | iLabelReserved | = "") |
-
Reads the total list of linked objects.
- Parameters:
-
- ioLinkedObjects
- The list of linked objects. This list does not need to be empty in order
to make the concatenation easier.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o ReadObject
public ReadObject( | | ioLinkedObject, |
| const | iLabelReserved | = "") |
-
Reads a linked object.
- Parameters:
-
- ioLinkedObject
- Retrieves the current linked object.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o ReadSurLimits
public ReadSurLimits( | | ioSurLimits, |
| | ipSurface, |
| const | iLabelReserved | = "") |
-
Reads a CATSurLimits.
- Parameters:
-
- ioSurLimits
- The read CATSurLimits.
- ipSurface
- The CATSurface with which the CATSurLimits is associated.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o ReadSurParam
public ReadSurParam( | | ioSurParam, |
| | ipSurface, |
| const | iLabelReserved | = "") |
-
Reads a CATSurParam.
- Parameters:
-
- ioSurParam
- The read CATSurParam.
- ipSurface
- The CATSurface with which the CATSurParam is associated.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o ResetToRawBehaviour
public ResetToRawBehaviour( | ) |
-
Resets the stream to raw behaviour.
This removes checks on the stream use (i.e. when no object streaming/unstreaming).
o SkipRemainingInformationsToRead
public SkipRemainingInformationsToRead( | ) |
-
Skips over remaining informations to read.
(i.e. what follows the linked objects sequence)
o SkipRemainingLinkedObjectsToRead
public SkipRemainingLinkedObjectsToRead( | ) |
-
Skips over remaining linked objects to read.
o WriteCrvLimits
public WriteCrvLimits( | const | ioCrvLimits, |
| const | iLabelReserved | = "") |
-
Writes a CATCrvLimits.
- Parameters:
-
- ioCrvLimits
- The CATCrvLimits to write.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o WriteCrvParam
public WriteCrvParam( | const | ioCrvParam, |
| const | iLabelReserved | = "") |
-
Writes a CATCrvParam.
- Parameters:
-
- ioCrvParam
- The CATCrvParam to write.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o WriteGeometryV5
public WriteGeometryV5( | | geometry, |
| const | iNbGeometry, |
| const | iReservedLabel | = "") |
-
Writes an array of CGM objects.
- Parameters:
-
- geometry
- A pointer to the array of CATICGMObjects to write.
- iNbGeometry
- The number of CATICGMObjects to write.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o WriteKnotVector
public WriteKnotVector( | const | ioKnotVector, |
| const | iLabelReserved | = "") |
-
Writes a CATKnotVector.
- Parameters:
-
- ioKnotVector
- The CATKnotVector to write.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o WriteLinkedObjectsCount
public WriteLinkedObjectsCount( | | iLinkedObjectsCount) |
-
Writes the linked objects count.
Refer to the
method for explanations about the write functions sequence.
o WriteListOfLinkedObjects
public WriteListOfLinkedObjects( | const | iLinkedObjects, |
| const | iLabelReserved | = "") |
-
Writes a (partial or total) list of linked objects.
Refer to
method for explanations about the write functions sequence.
- Parameters:
-
- iReservedLabel
- Reserved for future use. Do not change the default value.
o WriteObject
public WriteObject( | | iLinkedObject, |
| const | iLabelReserved | = "") |
-
Writes a linked object.
Refer to
method for explanations about the write functions sequence.
- Parameters:
-
- iReservedLabel
- Reserved for future use. Do not change the default value.
o WriteSurLimits
public WriteSurLimits( | const | ioSurLimits, |
| const | iLabelReserved | = "") |
-
Writes a CATSurLimits.
- Parameters:
-
- ioSurLimits
- The CATSurLimits to write.
- iReservedLabel
- Reserved for future use. Do not change the default value.
o WriteSurParam
public WriteSurParam( | const | ioSurParam, |
| const | iLabelReserved | = "") |
-
Writes a CATSurParam.
- Parameters:
-
- ioSurParam
- The CATSurParam to write.
- iReservedLabel
- Reserved for future use. Do not change the default value.
This object is included in the file: CATCGMStream.h
If needed, your Imakefile.mk should include the module: CATGeometricObjects
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.