1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0027336: Update STEP entities, according to AP242

Add header  and parameter for AP242.

Update entities:
product_definition_relationship
styled_item

Update select types:
security_classification_item
person_and_organization_item
organization_item
group_item
external_identification_item
document_reference_item
date_item
approval_item
external_identification_item
draughting_callout_element
value_qualifier
invisibility_context

update gdt tests.

fix compilation warnings.
This commit is contained in:
ika
2016-03-09 14:25:17 +03:00
committed by bugmaster
parent f98965d2bc
commit d658f27576
78 changed files with 2083 additions and 248 deletions

View File

@@ -180,6 +180,10 @@ RWStepBasic_RWProductDefinitionFormationRelationship.cxx
RWStepBasic_RWProductDefinitionFormationRelationship.hxx
RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.cxx
RWStepBasic_RWProductDefinitionFormationWithSpecifiedSource.hxx
RWStepBasic_RWProductDefinitionReference.cxx
RWStepBasic_RWProductDefinitionReference.hxx
RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.cxx
RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.hxx
RWStepBasic_RWProductDefinitionRelationship.cxx
RWStepBasic_RWProductDefinitionRelationship.hxx
RWStepBasic_RWProductDefinitionWithAssociatedDocuments.cxx

View File

@@ -0,0 +1,111 @@
// Created on: 2016-03-31
// Created by: Irina KRYLOVA
// Copyright (c) 2016 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//gka 05.03.99 S4134 upgrade from CD to DIS
#include <Interface_Check.hxx>
#include <Interface_EntityIterator.hxx>
#include <RWStepBasic_RWProductDefinitionReference.hxx>
#include <StepBasic_ExternalSource.hxx>
#include <StepBasic_ProductDefinitionReference.hxx>
#include <StepBasic_ProductDefinitionContext.hxx>
#include <StepBasic_ProductDefinitionFormation.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
//=======================================================================
//function : StepBasic_ProductDefinitionReference
//purpose :
//=======================================================================
RWStepBasic_RWProductDefinitionReference::RWStepBasic_RWProductDefinitionReference () {}
//=======================================================================
//function : StepBasic_ProductDefinitionReference
//purpose :
//=======================================================================
void RWStepBasic_RWProductDefinitionReference::ReadStep
(const Handle(StepData_StepReaderData)& data,
const Standard_Integer num,
Handle(Interface_Check)& ach,
const Handle(StepBasic_ProductDefinitionReference)& ent) const
{
// Number of Parameter Control
if (!data->CheckNbParams(num, 5, ach, "product_definition_reference")) return;
// Own field source
Handle(StepBasic_ExternalSource) aSource;
data->ReadEntity(num, 1,"source", ach, STANDARD_TYPE(StepBasic_ExternalSource), aSource);
// Own field : product_id
Handle(TCollection_HAsciiString) aProductId;
data->ReadString (num, 2, "product_id", ach, aProductId);
// Own field : product_definition_formation_id
Handle(TCollection_HAsciiString) aProductDefinitionFormationId;
data->ReadString (num, 3, "product_definition_formation_id", ach, aProductDefinitionFormationId);
// Own field : product_definition_id
Handle(TCollection_HAsciiString) aProductDefinitionId;
data->ReadString (num, 4, "product_definition_id", ach, aProductDefinitionId);
// Own field : id_owning_organization_name
Handle(TCollection_HAsciiString) aIdOwningOrganizationName;
if (data->IsParamDefined (num, 5)) {
data->ReadString (num, 5, "id_owning_organization_name", ach, aIdOwningOrganizationName);
}
//--- Initialisation of the read entity ---
ent->Init(aSource, aProductId, aProductDefinitionFormationId, aProductDefinitionId, aIdOwningOrganizationName);
}
//=======================================================================
//function : StepBasic_ProductDefinitionReference
//purpose :
//=======================================================================
void RWStepBasic_RWProductDefinitionReference::WriteStep
(StepData_StepWriter& SW,
const Handle(StepBasic_ProductDefinitionReference)& ent) const
{
// Own field : source
SW.Send(ent->Source());
// Own field : product_id
SW.Send(ent->ProductId());
// Own field : product_definition_formation_id
SW.Send(ent->ProductDefinitionFormationId());
// Own field : product_definition_id
SW.Send(ent->ProductDefinitionId());
// Own field : id_owning_organization_name
if (ent->HasIdOwningOrganizationName())
SW.Send(ent->IdOwningOrganizationName());
else
SW.SendUndef();
}
//=======================================================================
//function : StepBasic_ProductDefinitionReference
//purpose :
//=======================================================================
void RWStepBasic_RWProductDefinitionReference::Share(const Handle(StepBasic_ProductDefinitionReference)& ent, Interface_EntityIterator& iter) const
{
iter.GetOneItem(ent->Source());
}

View File

@@ -0,0 +1,47 @@
// Created on: 2016-03-31
// Created by: Irina KRYLOVA
// Copyright (c) 2016 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepBasic_RWProductDefinitionReference_HeaderFile
#define _RWStepBasic_RWProductDefinitionReference_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepBasic_ProductDefinitionReference;
class StepData_StepWriter;
class Interface_EntityIterator;
//! Read & Write Module for ProductDefinitionReference
class RWStepBasic_RWProductDefinitionReference
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepBasic_RWProductDefinitionReference();
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepBasic_ProductDefinitionReference)& ent) const;
Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepBasic_ProductDefinitionReference)& ent) const;
Standard_EXPORT void Share (const Handle(StepBasic_ProductDefinitionReference)& ent, Interface_EntityIterator& iter) const;
};
#endif // _RWStepBasic_RWProductDefinitionReference_HeaderFile

View File

@@ -0,0 +1,110 @@
// Created on: 2016-03-31
// Created by: Irina KRYLOVA
// Copyright (c) 2016 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Interface_Check.hxx>
#include <Interface_EntityIterator.hxx>
#include <RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation.hxx>
#include <StepBasic_ExternalSource.hxx>
#include <StepBasic_ProductDefinitionReferenceWithLocalRepresentation.hxx>
#include <StepBasic_ProductDefinitionContext.hxx>
#include <StepBasic_ProductDefinitionFormation.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
//=======================================================================
//function : RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation
//purpose :
//=======================================================================
RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation::
RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation () {}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation::ReadStep
(const Handle(StepData_StepReaderData)& data,
const Standard_Integer num,
Handle(Interface_Check)& ach,
const Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation)& ent) const
{
// Number of Parameter Control
if (!data->CheckNbParams(num, 5, ach, "product_definition_reference_with_local_representation")) return;
// Own field source
Handle(StepBasic_ExternalSource) aSource;
data->ReadEntity(num, 1,"source", ach, STANDARD_TYPE(StepBasic_ExternalSource), aSource);
// Inherited field : id
Handle(TCollection_HAsciiString) aId;
data->ReadString (num, 2, "id", ach, aId);
// Inherited field : description
Handle(TCollection_HAsciiString) aDescription;
if (data->IsParamDefined (num, 3)) {
data->ReadString (num, 3, "description", ach, aDescription);
}
// Inherited field : formation
Handle(StepBasic_ProductDefinitionFormation) aFormation;
data->ReadEntity(num, 4, "formation", ach, STANDARD_TYPE(StepBasic_ProductDefinitionFormation), aFormation);
// Inherited : frame_of_reference
Handle(StepBasic_ProductDefinitionContext) aFrameOfReference;
data->ReadEntity(num, 5,"frame_of_reference", ach, STANDARD_TYPE(StepBasic_ProductDefinitionContext), aFrameOfReference);
// Initialisation of the read entity
ent->Init(aSource, aId, aDescription, aFormation, aFrameOfReference);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation::WriteStep
(StepData_StepWriter& SW,
const Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation)& ent) const
{
// Own field : source
SW.Send(ent->Source());
// Inherited field : id
SW.Send(ent->Id());
// Inherited field : description
SW.Send(ent->Description());
// Inherited field : formation
SW.Send(ent->Formation());
// Inherited field : frame_of_reference
SW.Send(ent->FrameOfReference());
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation::Share(
const Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation)& ent,
Interface_EntityIterator& iter) const
{
iter.GetOneItem(ent->Source());
iter.GetOneItem(ent->Formation());
iter.GetOneItem(ent->FrameOfReference());
}

View File

@@ -0,0 +1,47 @@
// Created on: 2016-03-31
// Created by: Irina KRYLOVA
// Copyright (c) 2016 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation_HeaderFile
#define _RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
class StepData_StepReaderData;
class Interface_Check;
class StepBasic_ProductDefinitionReferenceWithLocalRepresentation;
class StepData_StepWriter;
class Interface_EntityIterator;
//! Read & Write Module for ProductDefinitionReferenceWithLocalRepresentation
class RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation();
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation)& ent) const;
Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation)& ent) const;
Standard_EXPORT void Share (const Handle(StepBasic_ProductDefinitionReferenceWithLocalRepresentation)& ent, Interface_EntityIterator& iter) const;
};
#endif // _RWStepBasic_RWProductDefinitionReferenceWithLocalRepresentation_HeaderFile

View File

@@ -18,7 +18,7 @@
#include <Interface_Check.hxx>
#include <Interface_EntityIterator.hxx>
#include <RWStepBasic_RWProductDefinitionRelationship.hxx>
#include <StepBasic_ProductDefinition.hxx>
#include <StepBasic_ProductDefinitionOrReference.hxx>
#include <StepBasic_ProductDefinitionRelationship.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
@@ -61,11 +61,11 @@ void RWStepBasic_RWProductDefinitionRelationship::ReadStep (const Handle(StepDat
hasDescription = Standard_False;
}
Handle(StepBasic_ProductDefinition) aRelatingProductDefinition;
data->ReadEntity (num, 4, "relating_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aRelatingProductDefinition);
StepBasic_ProductDefinitionOrReference aRelatingProductDefinition;
data->ReadEntity (num, 4, "relating_product_definition", ach, aRelatingProductDefinition);
Handle(StepBasic_ProductDefinition) aRelatedProductDefinition;
data->ReadEntity (num, 5, "related_product_definition", ach, STANDARD_TYPE(StepBasic_ProductDefinition), aRelatedProductDefinition);
StepBasic_ProductDefinitionOrReference aRelatedProductDefinition;
data->ReadEntity (num, 5, "related_product_definition", ach, aRelatedProductDefinition);
// Initialize entity
ent->Init(aId,
@@ -96,9 +96,9 @@ void RWStepBasic_RWProductDefinitionRelationship::WriteStep (StepData_StepWriter
}
else SW.SendUndef();
SW.Send (ent->RelatingProductDefinition());
SW.Send (ent->RelatingProductDefinitionAP242().Value());
SW.Send (ent->RelatedProductDefinition());
SW.Send (ent->RelatedProductDefinitionAP242().Value());
}
//=======================================================================
@@ -112,7 +112,7 @@ void RWStepBasic_RWProductDefinitionRelationship::Share (const Handle(StepBasic_
// Own fields of ProductDefinitionRelationship
iter.AddItem (ent->RelatingProductDefinition());
iter.AddItem (ent->RelatingProductDefinitionAP242().Value());
iter.AddItem (ent->RelatedProductDefinition());
iter.AddItem (ent->RelatedProductDefinitionAP242().Value());
}