Changeset: 373 fdbozzo - 21/07/2014 18:43:57:
- Primera versión funcional
This commit is contained in:
239
TESTS/ut__foxbin2prg__c_foxbin2prg__FilenameFoundInFilter.prg
Normal file
239
TESTS/ut__foxbin2prg__c_foxbin2prg__FilenameFoundInFilter.prg
Normal file
@@ -0,0 +1,239 @@
|
||||
DEFINE CLASS ut__foxbin2prg__c_foxbin2prg__FilenameFoundInFilter AS FxuTestCase OF FxuTestCase.prg
|
||||
|
||||
#IF .F.
|
||||
LOCAL THIS AS ut__foxbin2prg__c_foxbin2prg__FilenameFoundInFilter OF ut__foxbin2prg__c_foxbin2prg__FilenameFoundInFilter.PRG
|
||||
#ENDIF
|
||||
|
||||
icObj = NULL
|
||||
|
||||
|
||||
*******************************************************************************************************************************************
|
||||
FUNCTION SETUP
|
||||
PUBLIC oFXU_LIB AS CL_FXU_CONFIG OF 'TESTS\fxu_lib_objetos_y_funciones_de_soporte.PRG'
|
||||
*LOCAL loObj AS c_conversor_base OF "FOXBIN2PRG.PRG"
|
||||
SET PROCEDURE TO 'TESTS\fxu_lib_objetos_y_funciones_de_soporte.PRG'
|
||||
oFXU_LIB = CREATEOBJECT('CL_FXU_CONFIG')
|
||||
*oFXU_LIB.setup_comun()
|
||||
THIS.icObj = NEWOBJECT("c_foxbin2prg", "FOXBIN2PRG.PRG")
|
||||
*loObj = THIS.icObj
|
||||
*loObj.l_Test = .F.
|
||||
|
||||
ENDFUNC
|
||||
|
||||
|
||||
*******************************************************************************************************************************************
|
||||
FUNCTION TearDown
|
||||
#IF .F.
|
||||
PUBLIC oFXU_LIB AS CL_FXU_CONFIG OF 'TESTS\fxu_lib_objetos_y_funciones_de_soporte.PRG'
|
||||
#ENDIF
|
||||
THIS.icObj = NULL
|
||||
|
||||
IF VARTYPE(oFXU_LIB) = "O"
|
||||
*oFXU_LIB.teardown_comun()
|
||||
oFXU_LIB = NULL
|
||||
ENDIF
|
||||
RELEASE PROCEDURE 'TESTS\fxu_lib_objetos_y_funciones_de_soporte.PRG'
|
||||
RELEASE oFXU_LIB
|
||||
CLOSE PROCEDURES
|
||||
CLEAR RESOURCES
|
||||
|
||||
ENDFUNC
|
||||
|
||||
|
||||
*******************************************************************************************************************************************
|
||||
FUNCTION Evaluate_results
|
||||
LPARAMETERS toEx AS EXCEPTION, tnCodError_Esperado, tl_Valor, tl_ValorEsperado
|
||||
|
||||
#IF .F.
|
||||
PUBLIC oFXU_LIB AS CL_FXU_CONFIG OF 'TESTS\fxu_lib_objetos_y_funciones_de_soporte.PRG'
|
||||
#ENDIF
|
||||
|
||||
IF PCOUNT() = 0
|
||||
THIS.messageout( "* Support method, not a valid test." )
|
||||
RETURN .T.
|
||||
ENDIF
|
||||
|
||||
LOCAL loFoxBin2Prg AS c_foxbin2prg OF "FOXBIN2PRG.PRG"
|
||||
|
||||
IF ISNULL(toEx)
|
||||
loFoxBin2Prg = THIS.icObj
|
||||
|
||||
*-- MESSAGES
|
||||
THIS.messageout( 'Filename found in filter >> Esperado: ' + TRANSFORM(tl_ValorEsperado) )
|
||||
THIS.messageout( 'Filename found in filter >> Actual : ' + TRANSFORM(tl_Valor) )
|
||||
|
||||
*-- ASSERTIONS
|
||||
THIS.assertequals( tl_ValorEsperado, tl_Valor, 'Filename found in filter' )
|
||||
|
||||
loFoxBin2Prg = NULL
|
||||
RELEASE loFoxBin2Prg
|
||||
|
||||
ELSE
|
||||
*-- Evaluaci<63>n de errores
|
||||
THIS.messageout( "Error " + TRANSFORM(toEx.ERRORNO) + ', ' + TRANSFORM(toEx.MESSAGE) )
|
||||
THIS.messageout( toEx.PROCEDURE + ', ' + TRANSFORM(toEx.LINENO) )
|
||||
IF NOT INLIST( toEx.ERRORNO, 1098, 2071 ) && Error del usuario (ERROR y THROW)
|
||||
THIS.messageout( TRANSFORM(toEx.LINECONTENTS) )
|
||||
ENDIF
|
||||
|
||||
THIS.assertequals( tnCodError_Esperado, toEx.ERRORNO, 'Error' )
|
||||
ENDIF
|
||||
|
||||
THIS.messageout( '' )
|
||||
THIS.messageout( REPLICATE('*',80) )
|
||||
ENDFUNC
|
||||
|
||||
|
||||
*******************************************************************************************************************************************
|
||||
FUNCTION Deberia_EncontrarElArchivo__FB2P_FOXUSER_DBF__UsandoElFiltro__TB2P_xpx
|
||||
LOCAL lnCodError, lnCodError_Esperado ;
|
||||
, lc_File, lc_Filtros, ll_Valor, ll_ValorEsperado ;
|
||||
, loFoxBin2Prg AS c_foxbin2prg OF "FOXBIN2PRG.PRG" ;
|
||||
, loEx AS EXCEPTION
|
||||
#IF .F.
|
||||
PUBLIC oFXU_LIB AS CL_FXU_CONFIG OF 'TESTS\fxu_lib_objetos_y_funciones_de_soporte.PRG'
|
||||
#ENDIF
|
||||
|
||||
TRY
|
||||
loEx = NULL
|
||||
loFoxBin2Prg = NEWOBJECT("c_foxbin2prg", "FOXBIN2PRG.PRG")
|
||||
*loFoxBin2Prg.l_Debug = .F.
|
||||
loFoxBin2Prg.l_ShowErrors = .F.
|
||||
*loFoxBin2Prg.l_Test = .T.
|
||||
|
||||
|
||||
*-- DATOS DE ENTRADA
|
||||
STORE 0 TO lnCodError, lnCodError_Esperado
|
||||
lc_File = 'FB2P_FOXUSER.DBF'
|
||||
lc_Filtros = 'XX.DBF,FF.FRX,FB2P_*.*'
|
||||
ll_ValorEsperado = .T.
|
||||
|
||||
*-- EVALUACI<43>N DEL TEST
|
||||
ll_Valor = loFoxBin2Prg.FilenameFoundInFilter( lc_File, lc_Filtros )
|
||||
|
||||
CATCH TO loEx
|
||||
|
||||
FINALLY
|
||||
THIS.Evaluate_results( loEx, lnCodError_Esperado, ll_Valor, ll_ValorEsperado )
|
||||
STORE NULL TO loFoxBin2Prg
|
||||
RELEASE loFoxBin2Prg
|
||||
ENDTRY
|
||||
|
||||
ENDFUNC
|
||||
|
||||
|
||||
*******************************************************************************************************************************************
|
||||
FUNCTION Deberia_EncontrarElArchivo__FB2P_FOXUSER_DBF__UsandoElFiltro__x_FOXUSERpx
|
||||
LOCAL lnCodError, lnCodError_Esperado ;
|
||||
, lc_File, lc_Filtros, ll_Valor, ll_ValorEsperado ;
|
||||
, loFoxBin2Prg AS c_foxbin2prg OF "FOXBIN2PRG.PRG" ;
|
||||
, loEx AS EXCEPTION
|
||||
#IF .F.
|
||||
PUBLIC oFXU_LIB AS CL_FXU_CONFIG OF 'TESTS\fxu_lib_objetos_y_funciones_de_soporte.PRG'
|
||||
#ENDIF
|
||||
|
||||
TRY
|
||||
loEx = NULL
|
||||
loFoxBin2Prg = NEWOBJECT("c_foxbin2prg", "FOXBIN2PRG.PRG")
|
||||
*loFoxBin2Prg.l_Debug = .F.
|
||||
loFoxBin2Prg.l_ShowErrors = .F.
|
||||
*loFoxBin2Prg.l_Test = .T.
|
||||
|
||||
|
||||
*-- DATOS DE ENTRADA
|
||||
STORE 0 TO lnCodError, lnCodError_Esperado
|
||||
lc_File = 'FB2P_FOXUSER.DBF'
|
||||
lc_Filtros = 'XX.DBF,FF.FRX,*_FOXUSER.*'
|
||||
ll_ValorEsperado = .T.
|
||||
|
||||
*-- EVALUACI<43>N DEL TEST
|
||||
ll_Valor = loFoxBin2Prg.FilenameFoundInFilter( lc_File, lc_Filtros )
|
||||
|
||||
CATCH TO loEx
|
||||
|
||||
FINALLY
|
||||
THIS.Evaluate_results( loEx, lnCodError_Esperado, ll_Valor, ll_ValorEsperado )
|
||||
STORE NULL TO loFoxBin2Prg
|
||||
RELEASE loFoxBin2Prg
|
||||
ENDTRY
|
||||
|
||||
ENDFUNC
|
||||
|
||||
|
||||
*******************************************************************************************************************************************
|
||||
FUNCTION Deberia_EncontrarElArchivo__FB2P_FOXUSER_DBF__UsandoElFiltro__x_F_Xxpx
|
||||
LOCAL lnCodError, lnCodError_Esperado ;
|
||||
, lc_File, lc_Filtros, ll_Valor, ll_ValorEsperado ;
|
||||
, loFoxBin2Prg AS c_foxbin2prg OF "FOXBIN2PRG.PRG" ;
|
||||
, loEx AS EXCEPTION
|
||||
#IF .F.
|
||||
PUBLIC oFXU_LIB AS CL_FXU_CONFIG OF 'TESTS\fxu_lib_objetos_y_funciones_de_soporte.PRG'
|
||||
#ENDIF
|
||||
|
||||
TRY
|
||||
loEx = NULL
|
||||
loFoxBin2Prg = NEWOBJECT("c_foxbin2prg", "FOXBIN2PRG.PRG")
|
||||
*loFoxBin2Prg.l_Debug = .F.
|
||||
loFoxBin2Prg.l_ShowErrors = .F.
|
||||
*loFoxBin2Prg.l_Test = .T.
|
||||
|
||||
|
||||
*-- DATOS DE ENTRADA
|
||||
STORE 0 TO lnCodError, lnCodError_Esperado
|
||||
lc_File = 'FB2P_FOXUSER.DBF'
|
||||
lc_Filtros = 'XX.DBF,FF.FRX,*_F?X*.*'
|
||||
ll_ValorEsperado = .T.
|
||||
|
||||
*-- EVALUACI<43>N DEL TEST
|
||||
ll_Valor = loFoxBin2Prg.FilenameFoundInFilter( lc_File, lc_Filtros )
|
||||
|
||||
CATCH TO loEx
|
||||
|
||||
FINALLY
|
||||
THIS.Evaluate_results( loEx, lnCodError_Esperado, ll_Valor, ll_ValorEsperado )
|
||||
STORE NULL TO loFoxBin2Prg
|
||||
RELEASE loFoxBin2Prg
|
||||
ENDTRY
|
||||
|
||||
ENDFUNC
|
||||
|
||||
|
||||
*******************************************************************************************************************************************
|
||||
FUNCTION Deberia_NoEncontrarElArchivo__FB2P_FOXUSER_DBF__UsandoElFiltro__uuFxpx
|
||||
LOCAL lnCodError, lnCodError_Esperado ;
|
||||
, lc_File, lc_Filtros, ll_Valor, ll_ValorEsperado ;
|
||||
, loFoxBin2Prg AS c_foxbin2prg OF "FOXBIN2PRG.PRG" ;
|
||||
, loEx AS EXCEPTION
|
||||
#IF .F.
|
||||
PUBLIC oFXU_LIB AS CL_FXU_CONFIG OF 'TESTS\fxu_lib_objetos_y_funciones_de_soporte.PRG'
|
||||
#ENDIF
|
||||
|
||||
TRY
|
||||
loEx = NULL
|
||||
loFoxBin2Prg = NEWOBJECT("c_foxbin2prg", "FOXBIN2PRG.PRG")
|
||||
*loFoxBin2Prg.l_Debug = .F.
|
||||
loFoxBin2Prg.l_ShowErrors = .F.
|
||||
*loFoxBin2Prg.l_Test = .T.
|
||||
|
||||
|
||||
*-- DATOS DE ENTRADA
|
||||
STORE 0 TO lnCodError, lnCodError_Esperado
|
||||
lc_File = 'FB2P_FOXUSER.DBF'
|
||||
lc_Filtros = 'XX.DBF,FF.FRX,??F*.*'
|
||||
ll_ValorEsperado = .F.
|
||||
|
||||
*-- EVALUACI<43>N DEL TEST
|
||||
ll_Valor = loFoxBin2Prg.FilenameFoundInFilter( lc_File, lc_Filtros )
|
||||
|
||||
CATCH TO loEx
|
||||
|
||||
FINALLY
|
||||
THIS.Evaluate_results( loEx, lnCodError_Esperado, ll_Valor, ll_ValorEsperado )
|
||||
STORE NULL TO loFoxBin2Prg
|
||||
RELEASE loFoxBin2Prg
|
||||
ENDTRY
|
||||
|
||||
ENDFUNC
|
||||
|
||||
|
||||
ENDDEFINE
|
||||
118
foxbin2prg.prg
118
foxbin2prg.prg
@@ -451,6 +451,7 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
|
||||
+ [<memberdata name="ejecutar" display="Ejecutar"/>] ;
|
||||
+ [<memberdata name="evaluarconfiguracion" display="EvaluarConfiguracion"/>] ;
|
||||
+ [<memberdata name="exception2str" display="Exception2Str"/>] ;
|
||||
+ [<memberdata name="filenamefoundinfilter" display="FilenameFoundInFilter"/>] ;
|
||||
+ [<memberdata name="get_l_cfg_cachedaccess" display="get_l_CFG_CachedAccess"/>] ;
|
||||
+ [<memberdata name="get_l_configevaluated" display="get_l_ConfigEvaluated"/>] ;
|
||||
+ [<memberdata name="get_ext2fromext" display="Get_Ext2FromExt"/>] ;
|
||||
@@ -492,6 +493,8 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
|
||||
+ [<memberdata name="lbx_conversion_support" display="LBX_Conversion_Support"/>] ;
|
||||
+ [<memberdata name="mnx_conversion_support" display="MNX_Conversion_Support"/>] ;
|
||||
+ [<memberdata name="dbf_conversion_support" display="DBF_Conversion_Support"/>] ;
|
||||
+ [<memberdata name="dbf_conversion_included" display="DBF_Conversion_Included"/>] ;
|
||||
+ [<memberdata name="dbf_conversion_excluded" display="DBF_Conversion_Excluded"/>] ;
|
||||
+ [<memberdata name="dbc_conversion_support" display="DBC_Conversion_Support"/>] ;
|
||||
+ [<memberdata name="renamefile" display="RenameFile"/>] ;
|
||||
+ [<memberdata name="tienesoporte_bin2prg" display="TieneSoporte_Bin2Prg"/>] ;
|
||||
@@ -566,6 +569,8 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
|
||||
MNX_Conversion_Support = 2
|
||||
DBF_Conversion_Support = 1
|
||||
DBC_Conversion_Support = 2
|
||||
DBF_Conversion_Included = ''
|
||||
DBF_Conversion_Excluded = ''
|
||||
|
||||
|
||||
PROCEDURE INIT
|
||||
@@ -832,6 +837,24 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
|
||||
ENDPROC
|
||||
|
||||
|
||||
PROCEDURE DBF_Conversion_Included_ACCESS
|
||||
IF THIS.n_CFG_Actual = 0 OR ISNULL( THIS.o_Configuration( THIS.n_CFG_Actual ) )
|
||||
RETURN THIS.DBF_Conversion_Included
|
||||
ELSE
|
||||
RETURN NVL( THIS.o_Configuration( THIS.n_CFG_Actual ).DBF_Conversion_Included, THIS.DBF_Conversion_Included )
|
||||
ENDIF
|
||||
ENDPROC
|
||||
|
||||
|
||||
PROCEDURE DBF_Conversion_Excluded_ACCESS
|
||||
IF THIS.n_CFG_Actual = 0 OR ISNULL( THIS.o_Configuration( THIS.n_CFG_Actual ) )
|
||||
RETURN THIS.DBF_Conversion_Excluded
|
||||
ELSE
|
||||
RETURN NVL( THIS.o_Configuration( THIS.n_CFG_Actual ).DBF_Conversion_Excluded, THIS.DBF_Conversion_Excluded )
|
||||
ENDIF
|
||||
ENDPROC
|
||||
|
||||
|
||||
PROCEDURE DBC_Conversion_Support_ACCESS
|
||||
IF THIS.n_CFG_Actual = 0 OR ISNULL( THIS.o_Configuration( THIS.n_CFG_Actual ) )
|
||||
RETURN THIS.DBC_Conversion_Support
|
||||
@@ -1329,6 +1352,28 @@ DEFINE CLASS c_foxbin2prg AS CUSTOM
|
||||
ENDPROC
|
||||
|
||||
|
||||
FUNCTION FilenameFoundInFilter
|
||||
*---------------------------------------------------------------------------------------------------
|
||||
* PAR<41>METROS: (v=Pasar por valor | @=Pasar por referencia) (!=Obligatorio | ?=Opcional) (IN/OUT)
|
||||
* tcFilename (v! IN ) Nombre del archivo a evaluar
|
||||
* tcFilters (v! IN ) Filtros a evaluar (*,??E.*,R*.*)
|
||||
*---------------------------------------------------------------------------------------------------
|
||||
LPARAMETERS tcFilename, tcFilters
|
||||
|
||||
LOCAL llFound, laFiltros(1)
|
||||
tcFilename = UPPER(tcFilename)
|
||||
|
||||
FOR I = 1 TO ALINES( laFiltros, tcFilters + ',', 1+4, ',' )
|
||||
IF LIKE( UPPER(laFiltros(I)), tcFilename )
|
||||
llFound = .T.
|
||||
EXIT
|
||||
ENDIF
|
||||
ENDFOR
|
||||
|
||||
RETURN llFound
|
||||
ENDFUNC
|
||||
|
||||
|
||||
PROCEDURE Get_Ext2FromExt
|
||||
LPARAMETERS tcExt
|
||||
LOCAL lcExt2
|
||||
@@ -11131,7 +11176,7 @@ DEFINE CLASS c_conversor_dbf_a_prg AS c_conversor_bin_a_prg
|
||||
DODEFAULT( @toModulo, @toEx )
|
||||
|
||||
TRY
|
||||
LOCAL lnCodError, laDatabases(1), lnDatabases_Count, laDatabases2(1), lnLen, lc_FileTypeDesc ;
|
||||
LOCAL lnCodError, laDatabases(1), lnDatabases_Count, laDatabases2(1), lnLen, lc_FileTypeDesc, laLines(1) ;
|
||||
, ln_HexFileType, ll_FileHasCDX, ll_FileHasMemo, ll_FileIsDBC, lc_DBC_Name, lnDataSessionID, lnSelect ;
|
||||
, loTable AS CL_DBF_TABLE OF 'FOXBIN2PRG.PRG' ;
|
||||
, loDBFUtils AS CL_DBF_UTILS OF 'FOXBIN2PRG.PRG'
|
||||
@@ -11140,6 +11185,22 @@ DEFINE CLASS c_conversor_dbf_a_prg AS c_conversor_bin_a_prg
|
||||
loDBFUtils = CREATEOBJECT('CL_DBF_UTILS')
|
||||
|
||||
WITH THIS AS c_conversor_dbf_a_prg OF 'FOXBIN2PRG.PRG'
|
||||
*-- EVALUAR OPCIONES ESPEC<45>FICAS DE DBF
|
||||
|
||||
*-- Include
|
||||
IF NOT EMPTY(toFoxBin2Prg.DBF_Conversion_Included) AND NOT toFoxBin2Prg.DBF_Conversion_Included == '*' ;
|
||||
AND NOT toFoxBin2Prg.FilenameFoundInFilter( .c_InputFile, toFoxBin2Prg.DBF_Conversion_Included )
|
||||
toFoxBin2Prg.writeLog(' ' + .c_InputFile + ' no est<73> en el filtro DBF_Conversion_Included (' + toFoxBin2Prg.DBF_Conversion_Included + ')' )
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
*-- Exclude
|
||||
IF NOT EMPTY(toFoxBin2Prg.DBF_Conversion_Excluded) ;
|
||||
AND toFoxBin2Prg.FilenameFoundInFilter( .c_InputFile, toFoxBin2Prg.DBF_Conversion_Excluded )
|
||||
toFoxBin2Prg.writeLog(' ' + .c_InputFile + ' est<73> en el filtro DBF_Conversion_Excluded (' + toFoxBin2Prg.DBF_Conversion_Included + ')' )
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
loDBFUtils.getDBFmetadata( .c_InputFile, @ln_HexFileType, @ll_FileHasCDX, @ll_FileHasMemo, @ll_FileIsDBC, @lc_DBC_Name )
|
||||
lc_FileTypeDesc = loDBFUtils.fileTypeDescription(ln_HexFileType)
|
||||
lnDatabases_Count = ADATABASES(laDatabases)
|
||||
@@ -15900,7 +15961,9 @@ DEFINE CLASS CL_DBF_TABLE AS CL_CUS_BASE
|
||||
#ENDIF
|
||||
|
||||
TRY
|
||||
LOCAL lcText, lcTableCFG, lcIndexKey, lcIndexFile, loEx AS EXCEPTION ;
|
||||
LOCAL lcText, lcTableCFG, lcIndexKey, lcIndexFile, laConfig(1), lcValue, lcConfigItem ;
|
||||
, lc_DBF_Conversion_Order, lc_DBF_Conversion_Condition ;
|
||||
, loEx AS EXCEPTION ;
|
||||
, loRecords AS CL_DBF_RECORDS OF 'FOXBIN2PRG.PRG' ;
|
||||
, loFields AS CL_DBF_FIELDS OF 'FOXBIN2PRG.PRG' ;
|
||||
, loIndexes AS CL_DBF_INDEXES OF 'FOXBIN2PRG.PRG'
|
||||
@@ -15932,24 +15995,43 @@ DEFINE CLASS CL_DBF_TABLE AS CL_CUS_BASE
|
||||
lcText = lcText + loIndexes.toText( '', '', tc_InputFile )
|
||||
|
||||
IF toFoxBin2Prg.DBF_Conversion_Support = 4 && BIN2PRG (DATA EXPORT FOR DIFF)
|
||||
*-- If table CFG exists, use it to order records. FDBOZZO. 2014/06/15
|
||||
*-- If table CFG exists, use it for DBF-specific configuration. FDBOZZO. 2014/06/15
|
||||
lcTableCFG = tc_InputFile + '.CFG'
|
||||
|
||||
IF FILE(lcTableCFG)
|
||||
toFoxBin2Prg.writeLog()
|
||||
toFoxBin2Prg.writeLog('* Found configuration file: ' + lcTableCFG)
|
||||
lcIndexKey = ALLTRIM( FILETOSTR(lcTableCFG), 0, ' ', CHR(13), CHR(10) )
|
||||
|
||||
IF NOT EMPTY(lcIndexKey)
|
||||
*-- Leer valores de configuraci<63>n
|
||||
FOR I = 1 TO ALINES( laConfig, FILETOSTR( lcTableCFG ), 1+4 )
|
||||
lcConfigItem = LOWER( laConfig(I) )
|
||||
|
||||
DO CASE
|
||||
CASE INLIST( LEFT( lcConfigItem, 1 ), '*', '#', '/', "'" )
|
||||
LOOP
|
||||
|
||||
CASE LEFT( lcConfigItem, 21 ) == LOWER('DBF_Conversion_Order:')
|
||||
lc_DBF_Conversion_Order = ALLTRIM( SUBSTR( laConfig(I), 22 ) )
|
||||
toFoxBin2Prg.writeLog(' ' + JUSTFNAME(lcTableCFG) + ' -> DBF_Conversion_Order: ' + lc_DBF_Conversion_Order )
|
||||
|
||||
CASE LEFT( lcConfigItem, 25 ) == LOWER('DBF_Conversion_Condition:')
|
||||
lc_DBF_Conversion_Condition = ALLTRIM( SUBSTR( laConfig(I), 26 ) )
|
||||
toFoxBin2Prg.writeLog(' ' + JUSTFNAME(lcTableCFG) + ' -> DBF_Conversion_Condition: ' + lc_DBF_Conversion_Condition )
|
||||
|
||||
ENDCASE
|
||||
ENDFOR
|
||||
|
||||
IF NOT EMPTY(lc_DBF_Conversion_Order)
|
||||
lcIndexFile = FORCEEXT(tc_InputFile,'IDX')
|
||||
INDEX ON &lcIndexKey. TO (lcIndexFile) COMPACT
|
||||
toFoxBin2Prg.writeLog(' > Using Index order key: ' + lcIndexKey)
|
||||
INDEX ON &lc_DBF_Conversion_Order. TO (lcIndexFile) COMPACT
|
||||
toFoxBin2Prg.writeLog(' > Using Index order key: ' + lc_DBF_Conversion_Order)
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
*** DH 06/02/2014: added _Records
|
||||
loRecords = THIS._Records
|
||||
lcText = lcText + loRecords.toText(@laFields, lnFieldCount)
|
||||
lcText = lcText + loRecords.toText(@laFields, lnFieldCount, lc_DBF_Conversion_Condition)
|
||||
|
||||
ENDIF
|
||||
|
||||
@@ -16548,11 +16630,12 @@ DEFINE CLASS CL_DBF_RECORDS AS CL_COL_BASE
|
||||
|
||||
PROCEDURE toText
|
||||
*---------------------------------------------------------------------------------------------------
|
||||
* PAR<41>METROS: (!=Obligatorio | ?=Opcional) (@=Pasar por referencia | v=Pasar por valor) (IN/OUT)
|
||||
* taFields (@! IN ) Array de informaci<63>n de campos
|
||||
* tnField_Count (v! IN ) Cantidad de campos
|
||||
* PAR<41>METROS: (!=Obligatorio | ?=Opcional) (@=Pasar por referencia | v=Pasar por valor) (IN/OUT)
|
||||
* taFields (@! IN ) Array de informaci<63>n de campos
|
||||
* tnField_Count (v! IN ) Cantidad de campos
|
||||
* tc_DBF_Conversion_Condition (v? IN ) Condici<63>n de filtro para la conversi<73>n. Solo se exporta lo que la cumpla.
|
||||
*---------------------------------------------------------------------------------------------------
|
||||
LPARAMETERS taFields, tnField_Count
|
||||
LPARAMETERS taFields, tnField_Count, tc_DBF_Conversion_Condition
|
||||
|
||||
EXTERNAL ARRAY taFields
|
||||
|
||||
@@ -16567,8 +16650,12 @@ DEFINE CLASS CL_DBF_RECORDS AS CL_COL_BASE
|
||||
ENDTEXT
|
||||
|
||||
loRecord = CREATEOBJECT('CL_DBF_RECORD')
|
||||
|
||||
IF EMPTY(tc_DBF_Conversion_Condition)
|
||||
tc_DBF_Conversion_Condition = '.T.'
|
||||
ENDIF
|
||||
|
||||
SCAN
|
||||
SCAN FOR &tc_DBF_Conversion_Condition.
|
||||
lcText = lcText + loRecord.toText(@taFields, tnField_Count)
|
||||
ENDSCAN
|
||||
|
||||
@@ -16579,6 +16666,7 @@ DEFINE CLASS CL_DBF_RECORDS AS CL_COL_BASE
|
||||
|
||||
|
||||
CATCH TO loEx
|
||||
loEx.UserValue = loEx.UserValue + 'tc_DBF_Conversion_Condition = [' + TRANSFORM(tc_DBF_Conversion_Condition) + ']' + CR_LF
|
||||
IF THIS.l_Debug AND _VFP.STARTMODE = 0
|
||||
SET STEP ON
|
||||
ENDIF
|
||||
@@ -19652,7 +19740,7 @@ DEFINE CLASS CL_CFG AS CUSTOM
|
||||
#ENDIF
|
||||
|
||||
|
||||
*--
|
||||
*-- Configuration class. By default asumes master value, except when overriding one.
|
||||
c_Foxbin2prg_FullPath = ''
|
||||
c_Foxbin2prg_ConfigFile = ''
|
||||
c_CurDir = ''
|
||||
@@ -19679,6 +19767,8 @@ DEFINE CLASS CL_CFG AS CUSTOM
|
||||
LBX_Conversion_Support = NULL
|
||||
MNX_Conversion_Support = NULL
|
||||
DBF_Conversion_Support = NULL
|
||||
DBF_Conversion_Included = NULL
|
||||
DBF_Conversion_Excluded = NULL
|
||||
DBC_Conversion_Support = NULL
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user