-// File: ExpToCasExe.cxx
// Created: Mon Nov 1 12:50:27 1999
// Author: Andrey BETENEV
-// <abv@nordox.nnov.matra-dtv.fr>
+// Copyright (c) 1999-2020 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 <string.h>
#include <ctype.h>
#include <Express_Schema.hxx>
#include <Express_Item.hxx>
+#ifdef _MSC_VER
#pragma warning(push)
#pragma warning (disable:4267)
#pragma warning (disable:4706)
+#endif
Handle(Express_Schema) ec_parse ( FILE *fin ); // interface to parser
// std::cout << "Finished; total " << nbgen << " classes generated" << std::endl;
return 1;
}
-
+#ifdef _MSC_VER
#pragma warning(pop)
+#endif
# line 2 "Express.y"
-/* File: Express.y */
-/* Created: Thu Oct 28 12:21:16 1999 */
-/* Author: Andrey BETENEV */
-/* <abv@doomox.nnov.matra-dtv.fr> */
-/* Copyright: Matra Datavision 1999 */
+// Created: Thu Oct 28 12:21:16 1999
+// Author: Andrey BETENEV
+// Copyright (c) 1999-2020 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 <Express_Reference.hxx>
#include <Express.hxx>
+#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4244)
#pragma warning(disable:4274)
#pragma warning(disable:4800)
+#endif
+#if defined(__clang__)
+#pragma GCC diagnostic ignored "-Wmissing-braces"
+#endif
/************************************************/
/* ERROR MESSAGE FUNCTION */
* Copyright (c) 1993 by Sun Microsystems, Inc.
*/
-#pragma ident "@(#)yaccpar 6.14 97/01/16 SMI"
-
/*
** Skeleton parser driver for yacc output
*/
goto yystack; /* reset registers in driver code */
}
+#ifdef _MSC_VER
#pragma warning(pop)
+#endif
+// Created: Mon Nov 1 12:50:27 1999
+// Author: Andrey BETENEV
+// Copyright (c) 1999-2020 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.
typedef union
#ifdef __cplusplus
+// Created: Mon Nov 1 12:50:27 1999
+// Author: Andrey BETENEV
+// Copyright (c) 1999-2020 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 <stdio.h>
#include <stdlib.h>
+
+#if defined(__clang__)
+#pragma GCC diagnostic ignored "-Wmissing-braces"
+#endif
+
# define U(x) x
# define NLSTATE yyprevious=YYNEWLINE
# define BEGIN yybgin = yysvec + 1 +
struct yysvf *yyestate;
extern struct yysvf yysvec[], *yybgin;
+#ifdef _MSC_VER
#pragma warning(push)
#pragma warning (disable:4244)
#pragma warning (disable:4274)
#pragma warning (disable:4706)
#pragma warning (disable:4701)
+#endif
+
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-Wwrite-strings"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#endif
# line 4 "exptocas.l"
/* File: exptocas.l */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
-#pragma ident "@(#)ncform 6.11 97/01/06 SMI"
-
int yylineno =1;
# define YYU(x) x
# define NLSTATE yyprevious=YYNEWLINE
unput(c);
}
+#ifdef _MSC_VER
#pragma warning(pop)
+#endif
+// Created: Mon Nov 1 12:50:27 1999
+// Author: Andrey BETENEV
+// Copyright (c) 1999-2020 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 EXPCAS_H
#define EXPCAS_H
%{
-/* File: exptocas.l */
-/* Created: Thu Oct 28 12:21:16 1999 */
-/* Author: Andrey BETENEV */
-/* <abv@doomox.nnov.matra-dtv.fr> */
-/* Copyright: Matra Datavision 1999 */
+/* Created: Thu Oct 28 12:21:16 1999
+/* Author: Andrey BETENEV
+/* Copyright (c) 1999-2020 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.
/*****************************************************************************\
%{
-/* File: exptocas.y */
-/* Created: Thu Oct 28 12:21:16 1999 */
-/* Author: Andrey BETENEV */
-/* <abv@doomox.nnov.matra-dtv.fr> */
-/* Copyright: Matra Datavision 1999 */
+/* Created: Thu Oct 28 12:21:16 1999
+/* Author: Andrey BETENEV
+/* Copyright (c) 1999-2020 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.
/*****************************************************************************\
+// Created: Mon Nov 1 12:50:27 1999
+// Author: Andrey BETENEV
+// Copyright (c) 1999-2020 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 <stdio.h>
#include <stdlib.h>
# define U(x) x
Standard_EXPORT const Handle(Express_Type)& Type() const;
//! Returns name of aliased type
- Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const;
+ Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const Standard_OVERRIDE;
//! Create HXX/CXX files from item
- Standard_EXPORT virtual Standard_Boolean GenerateClass() const;
+ Standard_EXPORT virtual Standard_Boolean GenerateClass() const Standard_OVERRIDE;
Standard_EXPORT Express_Boolean();
//! Returns "Standard_Boolean"
- Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const;
+ Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const Standard_OVERRIDE;
Standard_EXPORT const Handle(Express_Type)& Type() const;
//! Returns CPP-style name of the type
- Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const;
+ Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const Standard_OVERRIDE;
//! Declares type as used by some item being generated.
//! Calls Use() for type of elements
- Standard_EXPORT virtual Standard_Boolean Use (const Handle(TCollection_HAsciiString)& pack, const Standard_Boolean defer = Standard_False) const;
+ Standard_EXPORT virtual Standard_Boolean Use (const Handle(TCollection_HAsciiString)& pack, const Standard_Boolean defer = Standard_False) const Standard_OVERRIDE;
}
// write field
- if ( mode == 0 ) {
- if (field->Type()->IsHandle())
- os << "const Handle(" << field->Type()->CPPName()->ToCString() << ")& the" << varName->ToCString();
- else
- os << "const " << field->Type()->CPPName()->ToCString() << " the" << varName->ToCString();
- }
- else if (mode == 1) {
+ if ( mode == 0 || mode ==1) {
os << "const " << (field->Type()->IsHandle() ? "Handle(" : "") <<
field->Type()->CPPName()->ToCString() << (field->Type()->IsHandle() ? ")" : "") <<
(field->Type()->IsSimple() ? " the" : "& the") << varName->ToCString();
typedef NCollection_DataMap<TCollection_AsciiString,Standard_Integer,TCollection_AsciiString> DataMapOfStringInteger;
//! Create HXX/CXX files from item
- Standard_EXPORT virtual Standard_Boolean GenerateClass() const;
+ Standard_EXPORT virtual Standard_Boolean GenerateClass() const Standard_OVERRIDE;
//! Writes includes section of HXX
Standard_EXPORT Standard_Boolean WriteIncludes (Standard_OStream& os, DataMapOfStringInteger& dict) const;
Standard_EXPORT const Handle(TColStd_HSequenceOfHAsciiString)& Names() const;
//! Create HXX/CXX files from item
- Standard_EXPORT virtual Standard_Boolean GenerateClass() const;
+ Standard_EXPORT virtual Standard_Boolean GenerateClass() const Standard_OVERRIDE;
Standard_EXPORT Express_Integer();
//! Returns "Standard_Integer"
- Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const;
+ Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const Standard_OVERRIDE;
Standard_EXPORT Express_Logical();
//! Returns "StepData_Logical"
- Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const;
+ Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const Standard_OVERRIDE;
//! Return False
- Standard_EXPORT virtual Standard_Boolean IsStandard() const;
+ Standard_EXPORT virtual Standard_Boolean IsStandard() const Standard_OVERRIDE;
//! Return False
- Standard_EXPORT virtual Standard_Boolean IsSimple() const;
+ Standard_EXPORT virtual Standard_Boolean IsSimple() const Standard_OVERRIDE;
//! Return False
- Standard_EXPORT virtual Standard_Boolean IsHandle() const;
+ Standard_EXPORT virtual Standard_Boolean IsHandle() const Standard_OVERRIDE;
Standard_EXPORT void SetItem (const Handle(Express_Item)& it) ;
//! Returns CPP-style name of the type
- Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const;
+ Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const Standard_OVERRIDE;
//! Return True if type is defined in package Standard
- Standard_EXPORT virtual Standard_Boolean IsStandard() const;
+ Standard_EXPORT virtual Standard_Boolean IsStandard() const Standard_OVERRIDE;
//! Return True if type is simple (not a class)
- Standard_EXPORT virtual Standard_Boolean IsSimple() const;
+ Standard_EXPORT virtual Standard_Boolean IsSimple() const Standard_OVERRIDE;
//! Return True if type is inherited from Transient
- Standard_EXPORT virtual Standard_Boolean IsHandle() const;
+ Standard_EXPORT virtual Standard_Boolean IsHandle() const Standard_OVERRIDE;
//! Declares type as used by some item being generated.
//! Calls Use() for referred item (found by name).
- Standard_EXPORT virtual Standard_Boolean Use (const Handle(TCollection_HAsciiString)& pack, const Standard_Boolean defer = Standard_False) const;
+ Standard_EXPORT virtual Standard_Boolean Use(const Handle(TCollection_HAsciiString)& pack, const Standard_Boolean defer = Standard_False) const Standard_OVERRIDE;
//! Returns True
- Standard_EXPORT virtual Standard_Boolean IsStandard() const;
+ Standard_EXPORT virtual Standard_Boolean IsStandard() const Standard_OVERRIDE;
Standard_EXPORT Express_Real();
//! Returns "Standard_Real"
- Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const;
+ Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const Standard_OVERRIDE;
//! Redefined to empty (in order to be able to instantiate)
//! Returna False
- Standard_EXPORT virtual Standard_Boolean GenerateClass() const;
+ Standard_EXPORT virtual Standard_Boolean GenerateClass() const Standard_OVERRIDE;
Standard_EXPORT const Handle(Express_HSequenceOfItem)& Items() const;
//! Create HXX/CXX files from item
- Standard_EXPORT virtual Standard_Boolean GenerateClass() const;
+ Standard_EXPORT virtual Standard_Boolean GenerateClass() const Standard_OVERRIDE;
Standard_EXPORT Express_String();
//! Returns "Handle(TCollection_HAsciiString)"
- Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const;
+ Standard_EXPORT virtual Handle(TCollection_HAsciiString) CPPName() const Standard_OVERRIDE;
//! Returns False
- Standard_EXPORT virtual Standard_Boolean IsStandard() const;
+ Standard_EXPORT virtual Standard_Boolean IsStandard() const Standard_OVERRIDE;