##// END OF EJS Templates
Updates DataSourceController::loadProductItem() method...
Updates DataSourceController::loadProductItem() method - Passes the DataSource uid as a parameter of the method. The uid will be used to retrieve the right provider, which will be passed for the variable creation - Stores data providers as shared_ptr instead of unique_ptr - Updates the mock plugin to pass the data source uid to the loadProductItem() method

File last commit:

r2:451739a45362
r167:31990a7209fc
Show More
IPSIS_S02.tcl
45 lines | 1.9 KiB | application/x-tcl | TclLexer
#!/usr/bin/tclsh
# The include guards should have the form PROJECT_FILENAME_H
set projectName [string toupper [getParameter "project-name" "PROJECTNAMENOTFOUND"]]
foreach fileName [getSourceFileNames] {
if {[regexp {(?:\\|/)?([^\\/]+?)\.h$} $fileName matchedExpr fileNameWithoutExt]} {
set upperFileName [string toupper $fileNameWithoutExt]
set expectedGuard "${projectName}_${upperFileName}_H"
set state "waitingForIfndef"
set firstInstruction 1
set ifndefLine -1
set prev ""
foreach token [getTokens $fileName 1 0 -1 -1 {pp_ifndef pp_ifdef pp_if pp_include pp_define pp_undef pp_error pp_pragma pp_endif identifier}] {
set type [lindex $token 3]
set line [lindex $token 1]
if {$firstInstruction} {
set firstInstruction 0
if {$type != "pp_ifndef"} {
report $fileName $line "The first preprocessor instruction of a header file should be the include guard of the form PROJECTNAME_FILENAME_H. (expected: $expectedGuard)"
break
} else {
set ifndefLine $line
}
}
if {$prev == "pp_ifndef"} {
if {$type == "identifier"} {
set identifier [lindex $token 0]
if {$identifier != $expectedGuard} {
report $fileName $ifndefLine "The include guard should have the form PROJECTNAME_FILENAME_H. (Found $identifier, expected $expectedGuard)"
}
} else {
report $fileName $ifndefLine "The first preprocessor instruction of a header file should be the include guard of the form PROJECTNAME_FILENAME_H. (expected: $expectedGuard)"
}
break
}
set prev $type
}
}
}