0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
[occt.git] / src / IGESSelect / IGESSelect_UpdateCreationDate.cxx
CommitLineData
b311480e 1// Copyright (c) 1999-2012 OPEN CASCADE SAS
2//
3// The content of this file is subject to the Open CASCADE Technology Public
4// License Version 6.5 (the "License"). You may not use the content of this file
5// except in compliance with the License. Please obtain a copy of the License
6// at http://www.opencascade.org and read it completely before using this file.
7//
8// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10//
11// The Original Code and all software distributed under the License is
12// distributed on an "AS IS" basis, without warranty of any kind, and the
13// Initial Developer hereby disclaims all such warranties, including without
14// limitation, any warranties of merchantability, fitness for a particular
15// purpose or non-infringement. Please see the License for the specific terms
16// and conditions governing the rights and limitations under the License.
17
7fd59977 18//#65 rln 12.02.99 S4151 (explicitly force YYMMDD.HHMMSS before Y2000 and YYYYMMDD.HHMMSS after Y2000)
19#include <IGESSelect_UpdateCreationDate.ixx>
20#include <OSD_Process.hxx>
21#include <Quantity_Date.hxx>
22#include <IGESData_GlobalSection.hxx>
23#include <TCollection_HAsciiString.hxx>
24#include <Interface_Check.hxx>
25
26
27
b311480e 28IGESSelect_UpdateCreationDate::IGESSelect_UpdateCreationDate ()
7fd59977 29 : IGESSelect_ModelModifier (Standard_False) { }
30
31 void IGESSelect_UpdateCreationDate::Performing
32 (IFSelect_ContextModif& ctx,
33 const Handle(IGESData_IGESModel)& target,
34 Interface_CopyTool& ) const
35{
36 Standard_Integer jour,mois,annee,heure,minute,seconde,millisec,microsec;
37 OSD_Process system;
38 Quantity_Date ladate = system.SystemDate();
39 ladate.Values (mois,jour,annee,heure,minute,seconde,millisec,microsec);
40
41 IGESData_GlobalSection GS = target->GlobalSection();
42 if (annee < 2000)
43 //#65 rln 12.02.99 S4151 (explicitly force YYMMDD.HHMMSS before Y2000)
44 GS.SetDate (IGESData_GlobalSection::NewDateString
45 (annee,mois,jour,heure,minute,seconde,0));
46 else
47 //#65 rln 12.02.99 S4151 (explicitly force YYYYMMDD.HHMMSS after Y2000)
48 GS.SetDate (IGESData_GlobalSection::NewDateString
49 (annee,mois,jour,heure,minute,seconde, -1));
50 target->SetGlobalSection(GS);
51 Handle(Interface_Check) check = new Interface_Check;
52 target->VerifyCheck(check);
53 ctx.AddCheck(check);
54}
55
56
57 TCollection_AsciiString IGESSelect_UpdateCreationDate::Label () const
58{ return TCollection_AsciiString ("Update Creation Date in IGES Global Section"); }