1 # Copyright (c) 1999-2014 OPEN CASCADE SAS
3 # This file is part of Open CASCADE Technology software library.
5 # This library is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU Lesser General Public License version 2.1 as published
7 # by the Free Software Foundation, with special exception defined in the file
8 # OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 # distribution for complete text of the license and disclaimer of any warranty.
11 # Alternatively, this file may be used under the terms of Open CASCADE
12 # commercial license or contractual agreement.
14 proc PMMgt_InsertDelete:AdmFileType {} {
18 proc PMMgt_InsertDelete:OutputDirTypeName {} {
23 proc PMMgt_InsertDelete:HandleInputFile { ID } {
25 scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name
28 Handle_PMMgt_PManaged.hxx {return 1;}
34 proc PMMgt_InsertDelete:AddDelete {name func} {
36 set dbmsprof [wokprofile -b]
37 if {$dbmsprof != "DFLT"} {
38 set status [catch { exec grep -s "^$func" $name >& /dev/null}]
40 set status [catch {exec sed -e "s?public:?$func?" <$name >${name}.new}]
41 msgprint -i -c "PMMgt_InsertDelete:Execute" "mv ${name}.new $name"
42 set status [catch {exec mv ${name}.new $name}]
44 set status [catch {exec chmod 664 $name}]
52 proc PMMgt_InsertDelete:Execute { unit args } {
54 msgprint -i -c "PMMgt_InsertDelete:Execute" "Insert virtual void delete() in Handle"
55 set dbmsprof [wokprofile -b]
58 scan $file "%\[^:\]:%\[^:\]:%\[^:\]" Unit type name
60 if {$name == "Handle_PMMgt_PManaged.hxx"} {
61 set vistarget [woklocate -p PMMgt:pubinclude:$name [wokinfo -N $unit]]
62 set target [wokinfo -p pubinclude:$name $unit]
63 set status [PMMgt_InsertDelete:AddDelete $vistarget "public: Standard_EXPORT void Delete();"]