OCC Main Page | DataExchange | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

# DataExchange
TKXDEIGES
IGESCAFControl

# IGESCAFControl_Writer Class Reference

Provides a tool to write DECAF document to the
IGES file. Besides transfer of shapes (including
assemblies) provided by IGESControl, supports also
colors and part names
IGESCAFControl_Writer writer();
Methods for writing IGES file:
writer.Transfer (Document);
writer.Write("filename") or writer.Write(OStream) or
writer.Perform(Document,"filename");
Methods for managing the writing of attributes.
Colors
writer.SetColorMode(colormode);
Standard_Boolean colormode = writer.GetColorMode();
Layers
writer.SetLayerMode(layermode);
Standard_Boolean layermode = writer.GetLayerMode();
Names
writer.SetNameMode(namemode);
Standard_Boolean namemode = writer.GetNameMode();
.

`#include <IGESCAFControl_Writer.hxx>`

Inheritance diagram for IGESCAFControl_Writer:

[legend]

## Public Member Functions
void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | IGESCAFControl_Writer ()
| Creates a writer with an empty IGES model and sets ColorMode, LayerMode and NameMode to Standard_True. .
Standard_EXPORT | IGESCAFControl_Writer (const Handle(XSControl_WorkSession)&WS, const Standard_Boolean scratch=Standard_True)
| Creates a reader tool and attaches it to an already existing Session Clears the session if it was not yet set for IGES .
Standard_EXPORT Standard_Boolean | Transfer (const Handle(TDocStd_Document)&doc)
| Transfers a document to a IGES model Returns True if translation is OK .
Standard_EXPORT Standard_Boolean | Perform (const Handle(TDocStd_Document)&doc, const TCollection_AsciiString &filename)
Standard_EXPORT Standard_Boolean | Perform (const Handle(TDocStd_Document)&doc, const Standard_CString filename)
| Transfers a document and writes it to a IGES file Returns True if translation is OK .
Standard_EXPORT void | SetColorMode (const Standard_Boolean colormode)
| Set ColorMode for indicate write Colors or not. .
Standard_EXPORT Standard_Boolean | GetColorMode () const
Standard_EXPORT void | SetNameMode (const Standard_Boolean namemode)
| Set NameMode for indicate write Name or not. .
Standard_EXPORT Standard_Boolean | GetNameMode () const
Standard_EXPORT void | SetLayerMode (const Standard_Boolean layermode)
| Set LayerMode for indicate write Layers or not. .
Standard_EXPORT Standard_Boolean | GetLayerMode () const
## Protected Member Functions
Standard_EXPORT Standard_Boolean | WriteAttributes (const Handle(TDocStd_Document)&doc)
| Reads colors from DECAF document and assigns them to corresponding IGES entities .
Standard_EXPORT Standard_Boolean | WriteLayers (const Handle(TDocStd_Document)&doc)
| Reads layers from DECAF document and assigns them to corresponding IGES entities .
Standard_EXPORT Standard_Boolean | WriteNames (const Handle(TDocStd_Document)&doc)
| Recursivile iterates on subshapes and assign names to IGES entity .
## Private Member Functions
Standard_EXPORT void | MakeColors (const TopoDS_Shape &S, const XCAFPrs_DataMapOfShapeStyle &settings, XCAFPrs_DataMapOfStyleTransient &colors, TopTools_MapOfShape &Map, const XCAFPrs_Style &inherit)
| Recursively iterates on subshapes and assigns colors to faces and edges (if set) .
## Private Attributes
Standard_Boolean | myColorMode
Standard_Boolean | myNameMode
Standard_Boolean | myLayerMode

## Constructor & Destructor Documentation

Standard_EXPORT IGESCAFControl_Writer::IGESCAFControl_Writer | ( |  | ) |

Standard_EXPORT IGESCAFControl_Writer::IGESCAFControl_Writer | ( | const Handle(XSControl_WorkSession)& | WS,
|  | const Standard_Boolean | scratch = `Standard_True`
| ) |

## Member Function Documentation

Standard_EXPORT Standard_Boolean IGESCAFControl_Writer::GetColorMode | ( |  | ) | const

Standard_EXPORT Standard_Boolean IGESCAFControl_Writer::GetLayerMode | ( |  | ) | const

Standard_EXPORT Standard_Boolean IGESCAFControl_Writer::GetNameMode | ( |  | ) | const

Standard_EXPORT void IGESCAFControl_Writer::MakeColors | ( | const TopoDS_Shape & | S,
|  | const XCAFPrs_DataMapOfShapeStyle & | settings,
|  | XCAFPrs_DataMapOfStyleTransient & | colors,
|  | TopTools_MapOfShape & | Map,
|  | const XCAFPrs_Style & | inherit
| ) | `[private]`

void IGESCAFControl_Writer::operator delete | ( | void * | anAddress | ) | `[inline]`

| Reimplemented from IGESControl_Writer.

void* IGESCAFControl_Writer::operator new | ( | size_t | size | ) | `[inline]`

| Reimplemented from IGESControl_Writer.

void* IGESCAFControl_Writer::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

| Reimplemented from IGESControl_Writer.

Standard_EXPORT Standard_Boolean IGESCAFControl_Writer::Perform | ( | const Handle(TDocStd_Document)& | doc,
|  | const Standard_CString | filename
| ) |

Standard_EXPORT Standard_Boolean IGESCAFControl_Writer::Perform | ( | const Handle(TDocStd_Document)& | doc,
|  | const TCollection_AsciiString & | filename
| ) |

Standard_EXPORT void IGESCAFControl_Writer::SetColorMode | ( | const Standard_Boolean | colormode | ) |

Standard_EXPORT void IGESCAFControl_Writer::SetLayerMode | ( | const Standard_Boolean | layermode | ) |

Standard_EXPORT void IGESCAFControl_Writer::SetNameMode | ( | const Standard_Boolean | namemode | ) |

Standard_EXPORT Standard_Boolean IGESCAFControl_Writer::Transfer | ( | const Handle(TDocStd_Document)& | doc | ) |

Standard_EXPORT Standard_Boolean IGESCAFControl_Writer::WriteAttributes | ( | const Handle(TDocStd_Document)& | doc | ) | `[protected]`

Standard_EXPORT Standard_Boolean IGESCAFControl_Writer::WriteLayers | ( | const Handle(TDocStd_Document)& | doc | ) | `[protected]`

Standard_EXPORT Standard_Boolean IGESCAFControl_Writer::WriteNames | ( | const Handle(TDocStd_Document)& | doc | ) | `[protected]`

## Field Documentation

Standard_Boolean IGESCAFControl_Writer::myColorMode`[private]`

Standard_Boolean IGESCAFControl_Writer::myLayerMode`[private]`

Standard_Boolean IGESCAFControl_Writer::myNameMode`[private]`

The documentation for this class was generated from the following file:

- IGESCAFControl_Writer.hxx