Click HERE to view the API documentation for this class. The complete documentation for all of the classes can be found in the API Reference.
Click HERE to view the source code for the class.
The update() method has been modified to perform specific actions for the pre/post processes.
update:
enter aPvxState
local psMajor$,psMinor$,enfState
! Get the Major/Minor codes that identify the current action
psMajor$=aPvxState'getMajor$(), \
psMinor$=aPvxState'getMinor$()
! Get the current state of processing for the ProvideX Event Manager
enfState=aPvxState'getArgumentValue(_pvxConstants'_iEventNotificationFlag$)
/*
* This observer is for the program build event only; all other events
* should be ignored.
*/
switch psMajor$ + "|" + psMinor$
! Build a ProvideX program
case _pvxConstants'Incremental_Build$ + "|" + _pvxConstants'BuildType_BuildOne$
case _pvxConstants'Incremental_Build_Alt_Exe$ + "|" + _pvxConstants'BuildType_BuildOne$
switch enfState
case _pvxConstants'_idePreProcess
isModified = _obj'update_copyright_year(aPvxState, outFile$)
! Set the current source file to the new output file
if isModified {
_obj'setCurrentSource(aPvxState, outFile$)
}
break
case _pvxConstants'_idePostProcess
! write status message
oReqClient = NEW( "pvxrequestclient")
oReqClient'print(_obj'getDescription$()+": " + tbl(isModified, "no change", "updated"))
drop object oReqClient
break
end switch
break
end switch
return 0