#include <CgmObject.h>

Public Member Functions | |
| virtual short * | toCgm (int &lBytes)=0 |
| virtual int | fromCgm (short *pData)=0 |
| virtual bool | serializeCgm (const std::string &fileName)=0 |
| virtual bool | deserializeCgm (const std::string &fileName)=0 |
| virtual void | setMetafileName (const std::string &metafileName)=0 |
| virtual const std::string & | getMetafileName () const =0 |
| virtual void | setPictureName (const std::string &metafileName)=0 |
| virtual const std::string & | getPictureName () const =0 |
| virtual void | setMetafileDescription (const std::string &metafileDescription)=0 |
| virtual const std::string & | getMetafileDescription () const =0 |
| virtual void | setFontList (const std::vector< std::string > &fontList)=0 |
| virtual void | getFontList (std::vector< std::string > &fontList) const =0 |
| virtual short | getVersion () const =0 |
| virtual short | getColorSelectionMode () const =0 |
| virtual short | getEdgeWidthMode () const =0 |
| virtual short | getLineWidthMode () const =0 |
| virtual void | destroy ()=0 |
Protected Member Functions | |
| virtual | ~CgmObject () |
Any graphic object can be converted to a CGM format using the CgmObject class. A CgmObject is obtained using the GraphicObject::convertToCgm() method. The class provides access functions to the CGM metadata as well as conversion methods to read and write the object in CGM binary format.
This subclass of Subject will notify upon the following conditions:
Definition at line 28 of file CgmObject.h.
| virtual CgmObject::~CgmObject | ( | ) | [protected, virtual] |
This should be destroyed by calling GraphicLayer::removeObject.
Definition at line 181 of file CgmObject.h.
| virtual short* CgmObject::toCgm | ( | int & | lBytes | ) | [pure virtual] |
Converts the graphic object to CGM binary format.
| lBytes | Populated with the total length in bytes of the CGM data. |
| virtual int CgmObject::fromCgm | ( | short * | pData | ) | [pure virtual] |
Modifies the properties of the graphic object to that contained in the given CGM binary data.
| pData | A pointer to the CGM data to use to convert the graphic object. |
| virtual bool CgmObject::serializeCgm | ( | const std::string & | fileName | ) | [pure virtual] |
Save a CGM to a file in binary format.
| fileName | The name of the file to serialize the data to. |
| virtual bool CgmObject::deserializeCgm | ( | const std::string & | fileName | ) | [pure virtual] |
Load a CGM from a file in binary format.
| fileName | The name of the file to deserialize the data from. |
| virtual void CgmObject::setMetafileName | ( | const std::string & | metafileName | ) | [pure virtual] |
Sets the Begin Metafile element name.
| metafileName | The new name for the element. |
| virtual const std::string& CgmObject::getMetafileName | ( | ) | const [pure virtual] |
Returns the Begin Metafile element name.
| virtual void CgmObject::setPictureName | ( | const std::string & | metafileName | ) | [pure virtual] |
Sets the Begin Picture element name.
| metafileName | The new name for the element. |
| virtual const std::string& CgmObject::getPictureName | ( | ) | const [pure virtual] |
Returns the Begin Picture element name.
| virtual void CgmObject::setMetafileDescription | ( | const std::string & | metafileDescription | ) | [pure virtual] |
Sets the Metafile Description element value.
| metafileDescription | The new description. |
| virtual const std::string& CgmObject::getMetafileDescription | ( | ) | const [pure virtual] |
Returns the Metafile Description element value.
| virtual void CgmObject::setFontList | ( | const std::vector< std::string > & | fontList | ) | [pure virtual] |
| virtual void CgmObject::getFontList | ( | std::vector< std::string > & | fontList | ) | const [pure virtual] |
Returns the font names for the Font List element.
| fontList | Populated with the font names from the font list. |
| virtual short CgmObject::getVersion | ( | ) | const [pure virtual] |
Returns the Metafile Version element value.
| virtual short CgmObject::getColorSelectionMode | ( | ) | const [pure virtual] |
Returns the Color Selection Mode element value.
| virtual short CgmObject::getEdgeWidthMode | ( | ) | const [pure virtual] |
Returns the Edge Width Specification Mode element value.
| virtual short CgmObject::getLineWidthMode | ( | ) | const [pure virtual] |
Returns the Line Width Specification Mode element value.
| virtual void CgmObject::destroy | ( | ) | [pure virtual] |
Destroys the CGM graphic object.
The CGM object becomes invalid after this method is called, so pointers to the object should be reset to NULL.