示例#1
0
int OGRTigerDataSource::Create( const char *pszNameIn, char **papszOptionsIn )

{
    VSIStatBufL      stat;

/* -------------------------------------------------------------------- */
/*      Try to create directory if it doesn't already exist.            */
/* -------------------------------------------------------------------- */
    if( VSIStatL( pszNameIn, &stat ) != 0 )
    {
        VSIMkdir( pszNameIn, 0755 );
    }

    if( VSIStatL( pszNameIn, &stat ) != 0 || !VSI_ISDIR(stat.st_mode) )
    {
        CPLError( CE_Failure, CPLE_AppDefined,
                  "%s is not a directory, nor can be directly created as one.",
                  pszNameIn );
        return FALSE;
    }

/* -------------------------------------------------------------------- */
/*      Store various information.                                      */
/* -------------------------------------------------------------------- */
    pszPath = CPLStrdup( pszNameIn );
    pszName = CPLStrdup( pszNameIn );
    bWriteMode = true;

    SetOptionList( papszOptionsIn );

/* -------------------------------------------------------------------- */
/*      Work out the version.                                           */
/* -------------------------------------------------------------------- */
//    nVersionCode = 1000; /* census 2000 */

    nVersionCode = 1002; /* census 2002 */
    if( GetOption("VERSION") != nullptr )
    {
        nVersionCode = atoi(GetOption("VERSION"));
        nVersionCode = std::max(0, std::min(9999, nVersionCode));
    }
    nVersion = TigerClassifyVersion(nVersionCode);

    return TRUE;
}
示例#2
0
void cCharMakeManager::Init()
{
	m_pNewPlayer = NULL;
	// desc_hseos_성별선택01
	// S 성별선택 추가 added by hseos 2007.06.16
	// ..여기 오기전에 DB에서 성별의 정보를 읽어와서 설정했기 때문에
	// ..초기화 하기 전과 후에 처리해줘야 함.
	BYTE nTmpSexType = m_CharMakeInfo.SexType;
	memset(&m_CharMakeInfo, 0, sizeof(CHARACTERMAKEINFO));
	// E 성별선택 추가 added by hseos 2007.06.16
	m_CharMakeInfo.SexType = nTmpSexType;
	m_pCharMakeNewDlg = ( CCharMakeNewDlg* )WINDOWMGR->GetWindowForID( CM_MAKEDLG ) ;

	// 061217 LYW --- Load and setting option list.
	LoadOptionList() ;
	SetOptionList( e_MFACE, 0 ) ;
	SetOptionList( e_MHAIR, 0 ) ;
	SetOptionList( e_WMFACE, 0 ) ;
	SetOptionList( e_WMHAIR, 0 ) ;

	SetOptionList( e_EMFACE, 0 ) ;
	SetOptionList( e_EMHAIR, 0 ) ;
	SetOptionList( e_EWMFACE, 0 ) ;
	SetOptionList( e_EWMHAIR, 0 ) ;

	// 090424 ONS 신규종족 관련 처리 추가 
	SetOptionList( e_DMFACE, 0 ) ;
	SetOptionList( e_DMHAIR, 0 ) ;
	SetOptionList( e_DWMFACE, 0 ) ;
	SetOptionList( e_DWMHAIR, 0 ) ;

	m_bInit = TRUE;

	// 061215 --- Delete this code for a moment.
	/*
	m_pHeight = (cGuageBar*)CHARMAKE->GetCharMakeDialog()->GetWindowForID(CMID_Height);
	m_pWidth = (cGuageBar*)CHARMAKE->GetCharMakeDialog()->GetWindowForID(CMID_Width);
	*/
}