|
|
|||
Warning, file /include/opencascade/IGESData_FreeFormatEntity.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // Created on: 1992-12-18 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1992-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _IGESData_FreeFormatEntity_HeaderFile 0018 #define _IGESData_FreeFormatEntity_HeaderFile 0019 0020 #include <Standard.hxx> 0021 0022 #include <Standard_Integer.hxx> 0023 #include <NCollection_Sequence.hxx> 0024 #include <NCollection_HSequence.hxx> 0025 #include <IGESData_UndefinedEntity.hxx> 0026 #include <Interface_ParamType.hxx> 0027 #include <IGESData_IGESEntity.hxx> 0028 #include <NCollection_Array1.hxx> 0029 #include <NCollection_HArray1.hxx> 0030 class IGESData_IGESEntity; 0031 class TCollection_HAsciiString; 0032 class IGESData_IGESWriter; 0033 0034 //! This class allows to create IGES Entities in a literal form : 0035 //! their definition is free, but they are not recognized as 0036 //! instances of specific classes. 0037 //! 0038 //! This is a way to define test files without having to create 0039 //! and fill specific classes of Entities, or creating an IGES 0040 //! File ex nihilo, with respect for all format constraints 0041 //! (such a way is very difficult to run and to master). 0042 //! 0043 //! This class has the same content as an UndefinedEntity, only 0044 //! it gives way to act on its content 0045 class IGESData_FreeFormatEntity : public IGESData_UndefinedEntity 0046 { 0047 0048 public: 0049 //! Creates a completely empty FreeFormatEntity 0050 Standard_EXPORT IGESData_FreeFormatEntity(); 0051 0052 //! Sets Type Number to a new Value, and Form Number to Zero 0053 Standard_EXPORT void SetTypeNumber(const int typenum); 0054 0055 //! Sets Form Number to a new Value (to called after SetTypeNumber) 0056 Standard_EXPORT void SetFormNumber(const int formnum); 0057 0058 //! Gives count of recorded parameters 0059 Standard_EXPORT int NbParams() const; 0060 0061 //! Returns data of a Parameter : its type, and the entity if it 0062 //! designates en entity ("ent") or its literal value else ("str") 0063 //! Returned value (Boolean) : True if it is an Entity, False else 0064 Standard_EXPORT bool ParamData(const int num, 0065 Interface_ParamType& ptype, 0066 occ::handle<IGESData_IGESEntity>& ent, 0067 occ::handle<TCollection_HAsciiString>& val) const; 0068 0069 //! Returns the ParamType of a Param, given its rank 0070 //! Error if num is not between 1 and NbParams 0071 Standard_EXPORT Interface_ParamType ParamType(const int num) const; 0072 0073 //! Returns True if a Parameter is recorded as an entity 0074 //! Error if num is not between 1 and NbParams 0075 Standard_EXPORT bool IsParamEntity(const int num) const; 0076 0077 //! Returns Entity corresponding to a Param, given its rank 0078 //! Error if out of range or if Param num does not designate 0079 //! an Entity 0080 Standard_EXPORT occ::handle<IGESData_IGESEntity> ParamEntity(const int num) const; 0081 0082 //! Returns True if <num> is noted as for a "Negative Pointer" 0083 //! (see AddEntity for details). Senseful only if IsParamEntity 0084 //! answers True for <num>, else returns False. 0085 Standard_EXPORT bool IsNegativePointer(const int num) const; 0086 0087 //! Returns literal value of a Parameter, given its rank 0088 //! Error if num is out of range, or if Parameter is not literal 0089 Standard_EXPORT occ::handle<TCollection_HAsciiString> ParamValue(const int num) const; 0090 0091 //! Returns the complete list of Ramks of Parameters which have 0092 //! been noted as Negative Pointers 0093 //! Warning : It is returned as a Null Handle if none was noted 0094 Standard_EXPORT occ::handle<NCollection_HSequence<int>> NegativePointers() const; 0095 0096 //! Adds a literal Parameter to the list (as such) 0097 Standard_EXPORT void AddLiteral(const Interface_ParamType ptype, 0098 const occ::handle<TCollection_HAsciiString>& val); 0099 0100 //! Adds a literal Parameter to the list (builds an HAsciiString) 0101 Standard_EXPORT void AddLiteral(const Interface_ParamType ptype, const char* const val); 0102 0103 //! Adds a Parameter which references an Entity. If the Entity is 0104 //! Null, the added parameter will define a "Null Pointer" (0) 0105 //! If <negative> is given True, this will command Sending to File 0106 //! (see IGESWriter) to produce a "Negative Pointer" 0107 //! (Default is False) 0108 Standard_EXPORT void AddEntity(const Interface_ParamType ptype, 0109 const occ::handle<IGESData_IGESEntity>& ent, 0110 const bool negative = false); 0111 0112 //! Adds a set of Entities, given as a HArray1OfIGESEntity 0113 //! Causes creation of : an Integer Parameter which gives count 0114 //! of Entities, then the list of Entities of the Array 0115 //! Error if an Entity is not an IGESEntity 0116 //! All these Entities will be interpreted as "Positive Pointers" 0117 //! by IGESWriter 0118 Standard_EXPORT void AddEntities( 0119 const occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>>& ents); 0120 0121 //! Adds a list of Ranks of Parameters to be noted as Negative 0122 //! Pointers (this will be taken into account for Parameters 0123 //! which are Entities) 0124 Standard_EXPORT void AddNegativePointers(const occ::handle<NCollection_HSequence<int>>& list); 0125 0126 //! Clears all information about Negative Pointers, hence every 0127 //! Entity kind Parameter will be sent normally, as Positive 0128 Standard_EXPORT void ClearNegativePointers(); 0129 0130 //! WriteOwnParams is redefined for FreeFormatEntity to take 0131 //! into account the supplementary information "Negative Pointer" 0132 Standard_EXPORT void WriteOwnParams(IGESData_IGESWriter& IW) const override; 0133 0134 DEFINE_STANDARD_RTTIEXT(IGESData_FreeFormatEntity, IGESData_UndefinedEntity) 0135 0136 private: 0137 occ::handle<NCollection_HSequence<int>> thenegptrs; 0138 }; 0139 0140 #endif // _IGESData_FreeFormatEntity_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|