示例#1
0
void CRulesManager::ReadRule(LPCTSTR RuleName, USB_DK_HIDE_RULE &Rule) const
{
    Rule.Type  = ReadDword(RuleName, USBDK_HIDE_RULE_TYPE);
    Rule.Hide  = ReadBool(RuleName, USBDK_HIDE_RULE_SHOULD_HIDE);
    Rule.VID   = ReadDwordMask(RuleName, USBDK_HIDE_RULE_VID);
    Rule.PID   = ReadDwordMask(RuleName, USBDK_HIDE_RULE_PID);
    Rule.BCD   = ReadDwordMask(RuleName, USBDK_HIDE_RULE_BCD);
    Rule.Class = ReadDwordMask(RuleName, USBDK_HIDE_RULE_CLASS);
}
示例#2
0
/*
=====================
idRestoreGame::ReadClipModel
=====================
*/
void idRestoreGame::ReadClipModel( idClipModel *&clipModel ) {
	bool restoreClipModel;
	ReadBool( restoreClipModel );
	if( restoreClipModel ) {
		clipModel = new idClipModel();
		clipModel->Restore( this );
	} else {
		clipModel = NULL;
	}
}
示例#3
0
bool  DPO_XYReduction::ReadFromFile()
{
    ReadObjectHeader();
    ReadFuncObjRef(xyInputObjRef);
    ReadText(outputDesc, DFO_XYBase::outputDescLen);

    dataReductionOperation = ReductionOp(ReadInt());
    pointSkipInterval = ReadInt();
    maxXChange = ReadDouble();
    maxYChange = ReadDouble();
    if (currentObjReadMajorVersion > 0)
    {
        logXChange = ReadBool();
        logYChange = ReadBool();
    }

    CheckForInputFailure("Reading DPO_XYReduction");
    return true;
}
示例#4
0
void ReadLineSpec(PSC_LineSpec& lineSpec)
{
    int readVer = ReadInt();

    lineSpec.linePen        = ReadInt();
    lineSpec.lineType       = PlotLineType(ReadInt());
    lineSpec.lineThickness  = ReadInt();
    if (readVer > 0)
        lineSpec.mitreLines = ReadBool();
}
示例#5
0
    bool SampleStaticSupport::ReadFromFile()
    {
        ReadGroupHeader(groupHeader, majorVersion);

        if (currentObjReadMajorVersion > 0)
        {
            // global objects
            ReadGlobalFunc(sampResultsFO);
        }

        if (currentObjReadMajorVersion > 2)
        {
            ReadGlobalFunc(uncertInput);
            ReadGlobalFunc(uncertResultsFO);
            uncertType = UncertType(ReadInt());
        }

        //  static control variables basic
        samplingIsLHS           = ReadBool();
        specifyCorrelations     = ReadBool();
        forceCorrelationsToZero = ReadBool();
        numberOfTrials          = ReadInt();
        randSeed                = ReadInt();
        if (currentObjReadMajorVersion > 1)
            singleRunRealization = ReadInt();

        if (currentObjReadMajorVersion > 2)
        {
            calcDerivSpan = ReadBool();
            derivSpan = ReadDouble();

            for (int i = 0; i < UncertInput::maxMetricSel; i++)
            {
                uncertInput.inputMetrics[i].uncertOnMetric = ReadBool();
                ReadFuncObjRef(uncertInput.inputMetrics[i].metricObject);
            }
        }

        SampVarPostReadFixup();


        return true;
    }
示例#6
0
void ReadColorBase(PSC_ColorBase& colorBase)
{
    int scalarReadVer = ReadInt();

    ReadFuncObjRef(colorBase.inputDataObjRef);
    ReadFuncObjRef(colorBase.colorMapObjRef);
    ReadFuncObjRef(colorBase.limitMasterObjRef);

    colorBase.limitIsMaster = ReadBool();

    colorBase.rangeLimit.logRange = ReadBool();
    colorBase.rangeLimit.minLimit = ReadNullDouble();
    colorBase.rangeLimit.maxLimit = ReadNullDouble();

    colorBase.autoLimits         = ReadBool();
    colorBase.baseAutoDataSource     = ReadInt();
    colorBase.clipToRange        = ReadBool();

    CheckForInputFailure("Reading PSC_ColorBase");
}
示例#7
0
bool  DPO_CreateSpecialCDF::ReadFromFile()
{
    ReadObjectHeader();

    ReadFuncObjRef(xyInputObjRef);
    distributionType = DistributionType(ReadInt());
    normalizeInputProbabilities = ReadBool();

    CheckForInputFailure("Reading DPO_CreateSpecialCDF");
    return true;
}
bool  DPO_CreateBEETResponseFunction::ReadFromFile()
{
    ReadObjectHeader();

    ReadFuncObjRef(pressureInputObjRef);
    ReadFuncObjRef(barometricInputObjRef);
    ReadFuncObjRef(earthTideInputObjRef);

    calcBE = ReadBool();
    calcET = ReadBool();

    ReadRealMSSpec(maxTimeDelayMS);
    timeBase = TimeBase(ReadInt());
    ReadRealMSSpec(specTimeSpacingMS);

    convertType = ReadInt();

    CheckForInputFailure("Reading DPO_CreateBEETResponseFunction");
    return true;
}
示例#9
0
bool  DPO_Normalize::ReadFromFile()
{
    int stVer = ReadInt();

    ReadRealMSSpec(bpRef.normPowerMS);
    bpRef.isMaster = ReadBool();

    bpRef.normalizeDC.normalizeOp    = DC_Normalize::NormalizeOp(ReadInt());
    bpRef.normalizeDC.autoLimit      = ReadBool();
    bpRef.normalizeDC.inputMinimum   = ReadDouble();
    bpRef.normalizeDC.inputMaximum   = ReadDouble();
    bpRef.normalizeDC.outputMinimum  = ReadDouble();
    bpRef.normalizeDC.outputMaximum  = ReadDouble();
    bpRef.normalizeDC.normPower      = ReadDouble();

    exposedNormPower.ReadExposed();

    CheckForInputFailure("Reading DPO_Normalize");
    return true;
}
示例#10
0
bool  PPO_DataLabels::ReadFromFile()
{
    ReadObjectHeader();
    PPO_AnnoBase::ReadFromFile();
    ReadFuncObjRef(penSetObjRef);

    int nread = PFO_DataLabels::maxDataLabels;
    if (currentObjReadMajorVersion < 1)
        nread = 6;

    for ( int i = 0; i < nread; i++)
    {
        ReadFuncObjRef(labelData[i].labelObjRef);
        labelData[i].doLabel   = ReadBool();
        labelData[i].labAlign  = HorizontalTextAlignment(ReadInt());

        labelData[i].overrideFormat                 = ReadBool();
        labelData[i].labelFormat.format             = NumConvFormat(ReadInt());
        labelData[i].labelFormat.digitsPrecision    = ReadInt();

        labelData[i].overrideMainLabel     = ReadBool();
        ReadText(labelData[i].mainLabel, DO_Label::maxLabelLen);
        ReadText(labelData[i].unitsLabel, DO_Label::maxLabelLen);
    }

    ulLocation.pX = ReadDouble();
    ulLocation.pY = ReadDouble();

    ReadText(legendTitle, PSC_AnnoSpec::legendTitleLen);

    frameLegend        = ReadBool();
    frameThick         = ReadInt();
    opaqueBackground   = ReadBool();
    legendPen          = ReadInt();
    minDataFieldWidth  = ReadInt();

    ReadFont(legendFont);

    CheckForInputFailure("Reading PPO_DataLabels");
    return true;
}
示例#11
0
/*
================
idRestoreGame::ReadRenderLight
================
*/
void idRestoreGame::ReadRenderLight( renderLight_t& renderLight )
{
	int index;
	int i;
	
	ReadMat3( renderLight.axis );
	ReadVec3( renderLight.origin );
	
	ReadInt( renderLight.suppressLightInViewID );
	ReadInt( renderLight.allowLightInViewID );
	ReadBool( renderLight.noShadows );
	ReadBool( renderLight.noSpecular );
	ReadBool( renderLight.pointLight );
	ReadBool( renderLight.parallel );
	
	ReadVec3( renderLight.lightRadius );
	ReadVec3( renderLight.lightCenter );
	
	ReadVec3( renderLight.target );
	ReadVec3( renderLight.right );
	ReadVec3( renderLight.up );
	ReadVec3( renderLight.start );
	ReadVec3( renderLight.end );
	
	// only idLight has a prelightModel and it's always based on the entityname, so we'll restore it there
	// ReadModel( renderLight.prelightModel );
	renderLight.prelightModel = NULL;
	
	ReadInt( renderLight.lightId );
	
	ReadMaterial( renderLight.shader );
	
	for( i = 0; i < MAX_ENTITY_SHADER_PARMS; i++ )
	{
		ReadFloat( renderLight.shaderParms[ i ] );
	}
	
	ReadInt( index );
	renderLight.referenceSound = gameSoundWorld->EmitterForIndex( index );
}
示例#12
0
    void ReadAppGlobals()
    {
        ReadGroupHeader(appGlobalHeader, majorVersionNum);

        usePageObjectVersioning = (currentObjReadMajorVersion > 3);

        if (currentObjReadMajorVersion > 1)
            {
                ReadFuncObjList();
#ifndef ADCONSOLEAPP
                ReadGlobalFunc(appDefaultObjects::sysInfoObj);
                if (currentObjReadMajorVersion > 2)
                    {
                        ReadGlobalFunc(appDefaultObjects::defaultPenObj);
                        ReadGlobalFunc(appDefaultObjects::coldHotMapObj);
                        ReadGlobalFunc(appDefaultObjects::whiteBlackMapObj);
                    }

#else
                // all will be > ver 1
                for (int i = 0; i < 4; i++)
                    FuncObjC* dummy = ReadFuncObj();

#endif //ADCONSOLEAPP

                return;
            }

#ifndef ADCONSOLEAPP
        // all cmd line will be new
        // older version
        ReadBool();   // small fonts
        if (currentObjReadMajorVersion > 0)
            {
                // tre settings
                int nSingleLine = ReadInt();
                int nSingleLineType = ReadInt();
            }

        int nSysToRead = ReadInt();
        ReadFuncObjList();

        // sys info was always first
        FuncObjC::updateData[0].newRef = &appDefaultObjects::sysInfoObj;

        // app specific objects start at 1
        for (int i = 1; i < nSysToRead; i++)
            FuncObjC::updateData[i].newRef = prevVerSystemObjects[i - 1];

#endif // ADCONSOLEAPP

    }
示例#13
0
bool DPO_TableTranspose::ReadFromFile()
{
    ReadObjectHeader();
    ReadFuncObjRef(inputTableObjRef);
    if (currentObjReadMajorVersion > 0)
    {
        skipXColumn     = ReadBool();
        xcolumnIndex    = ReadInt();
    }

    CheckForInputFailure("Reading DPO_TableTranspose");
    return true;
}
示例#14
0
void  MenuObjC::ReadObjectHeader()
{
    currentObjReadMajorVersion = ReadInt();
    currentObjReadMinorVersion = ReadInt();
    if (objFunction)
        {
            ReadAndMatchFuncObj(objFunction);
            ReadText(objFunction->objID, FuncObjC::objectIDLen);
            objFunction->objIDisDefault = ReadBool();
        }
    else
        {
            ReadText(objectID, FuncObjC::objectIDLen);
        }

    objDeleteable       = ReadBool();
    objCopyable             = ReadBool();

    objSelected = ReadBool();

    CheckForInputFailure("Reading MenuObjC Properties");
}
示例#15
0
void ReadGridLineLabelFormat(PSC_GridLineLabelFormat& labelFormat)
{
    int labelReadVer = ReadInt();

    if (labelReadVer == 0)
    {
        bool doLabel = ReadBool();
        if (doLabel)
            labelFormat.labelType = PSC_GridLineLabelFormat::ltText;
        else
            labelFormat.labelType = PSC_GridLineLabelFormat::ltNone;
    }
    else
        labelFormat.labelType = PSC_GridLineLabelFormat::LabelType(ReadInt());

    labelFormat.labelPosition = ReadDouble();
    labelFormat.labelOffset = ReadInt();

    labelFormat.halign = HorizontalTextAlignment(ReadInt());
    labelFormat.valign = VerticalTextAlignment(ReadInt());
    labelFormat.blankLabel = ReadBool();
}
示例#16
0
bool LayerStaticSupport::ReadFromFile()
{
  ReadGroupHeader(groupHeader, majorVersion);

  enterLayerDepths = ReadBool();
  ReadUnitReal(bottomLayerDepth);
  ReadUnitReal(bottomLayerElevation);
  useCommonHistory  = ReadBool();
  ReadUnitIndex(wellboreZoneDeltaVolumeUnits);
  ReadUnitIndex(wellboreZoneTZCompUnits);

  geologyLayers.SetSize(ReadInt());
  wellBoreZones.SetSize(ReadInt());

  for (int i = 0; i < geologyLayers.Size(); i++)
    ReadGeoLayer(geologyLayers[i]);

  for (int i = 0; i < wellBoreZones.Size(); i++)
    ReadWellBoreZone(wellBoreZones[i]);

  return true;
}
// Load current option flags to the model file.
// Note: this will override the user-specified flags.
void CoreferenceOptions::Load(FILE* fs) {
  Options::Load(fs);

  bool success;
  //success = ReadInteger(fs, &FLAGS_sequence_model_type);
  //CHECK(success);
  //LOG(INFO) << "Setting --sequence_model_type=" << FLAGS_sequence_model_type;
  //success = ReadBool(fs, &FLAGS_tagger_large_feature_set);
  //CHECK(success);
  //LOG(INFO) << "Setting --tagger_large_feature_set="
  //          << FLAGS_tagger_large_feature_set;

  success = ReadBool(fs, &FLAGS_use_gender_number_determiners);
  CHECK(success);
  LOG(INFO) << "Setting --use_gender_number_determiners="
            << FLAGS_use_gender_number_determiners;
  success = ReadBool(fs, &FLAGS_use_gender_number_statistics);
  CHECK(success);
  LOG(INFO) << "Setting --use_gender_number_statistics="
            << FLAGS_use_gender_number_statistics;
  success = ReadBool(fs,
                     &FLAGS_generate_noun_phrase_mentions_by_dependencies);
  CHECK(success);
  LOG(INFO) << "Setting --generate_noun_phrase_mentions_by_dependencies="
            << FLAGS_generate_noun_phrase_mentions_by_dependencies;
  success = ReadDouble(fs, &FLAGS_false_anaphor_cost);
  CHECK(success);
  LOG(INFO) << "Setting --false_anaphor_cost=" << FLAGS_false_anaphor_cost;
  success = ReadDouble(fs, &FLAGS_false_new_cost);
  CHECK(success);
  LOG(INFO) << "Setting --false_new_cost=" << FLAGS_false_new_cost;
  success = ReadDouble(fs, &FLAGS_false_wrong_link_cost);
  CHECK(success);
  LOG(INFO) << "Setting --false_wrong_link_cost="
            << FLAGS_false_wrong_link_cost;

  Initialize();
}
示例#18
0
/*
================
idRestoreGame::ReadRenderEntity
================
*/
void idRestoreGame::ReadRenderEntity( renderEntity_t &renderEntity ) {
	int i;
	int index;
	ReadModel( renderEntity.hModel );
	ReadInt( renderEntity.entityNum );
	ReadInt( renderEntity.bodyId );
	ReadBounds( renderEntity.bounds );
	// callback is set by class's Restore function
	renderEntity.callback = NULL;
	renderEntity.callbackData = NULL;
	ReadInt( renderEntity.suppressSurfaceInViewID );
	ReadInt( renderEntity.suppressShadowInViewID );
	ReadInt( renderEntity.suppressShadowInLightID );
	ReadInt( renderEntity.allowSurfaceInViewID );
	ReadVec3( renderEntity.origin );
	ReadMat3( renderEntity.axis );
	ReadMaterial( renderEntity.customShader );
	ReadMaterial( renderEntity.referenceShader );
	ReadSkin( renderEntity.customSkin );
	ReadInt( index );
	renderEntity.referenceSound = gameSoundWorld->EmitterForIndex( index );
	for( i = 0; i < MAX_ENTITY_SHADER_PARMS; i++ ) {
		ReadFloat( renderEntity.shaderParms[ i ] );
	}
	for( i = 0; i < MAX_RENDERENTITY_GUI; i++ ) {
		ReadUserInterface( renderEntity.gui[ i ] );
	}
	// idEntity will restore "cameraTarget", which will be used in idEntity::Present to restore the remoteRenderView
	renderEntity.remoteRenderView = NULL;
	renderEntity.joints = NULL;
	renderEntity.numJoints = 0;
	ReadFloat( renderEntity.modelDepthHack );
	ReadBool( renderEntity.noSelfShadow );
	ReadBool( renderEntity.noShadow );
	ReadBool( renderEntity.noDynamicInteractions );
	ReadBool( renderEntity.weaponDepthHack );
	ReadInt( renderEntity.forceUpdate );
}
示例#19
0
void DataCaptureStaticSupport::ReadDataCapture(DataCaptureSpecGlob& inDC)
{
  ReadText(inDC.dataDesig, DataCaptureSpec::dataDesigLen);
  inDC.makeDefaultDataDesig = ReadBool();
  inDC.captureType     = DataCaptureSpec::CaptureType(ReadInt());
  inDC.pressureCapType   = DataCaptureSpec::PressureCapType(ReadInt());
  inDC.flowCapType     = DataCaptureSpec::FlowCapType(ReadInt());
  inDC.productionCapType = DataCaptureSpec::ProductionCapType(ReadInt());
  inDC.testZoneCapType   = DataCaptureSpec::TestZoneCapType(ReadInt());

  ReadUnitReal(inDC.radiusData);
  if (currentObjReadMajorVersion > 2)
  {
    inDC.zvalueIsRatio = ReadBool();    // added v3
    ReadUnitReal(inDC.actualZ);   // added v3
    inDC.normalizedZ = ReadDouble();    // added v3
  }

  if (currentObjReadMajorVersion > 3)
  {
    ReadUnitReal(inDC.obsXLocation);    // added v4
    ReadUnitReal(inDC.obsYLocation);    // added v4
  }

  if (currentObjReadMajorVersion > 4)
    ReadText(inDC.wellboreZoneID, IntervalBase::intervalIDLen);

  ReadUnitIndex(inDC.outputUnits);

  if (currentObjReadMajorVersion > 1)
    ReadGlobalFunc(inDC.outputFO);

  inDC.superData.AllocAndCreate(ReadInt());
  for (int i = 0; i < inDC.superData.Size(); i++)
    ReadSuperComponent(inDC.superData.GetRef(i));
  inDC.SetIDs();

}
示例#20
0
bool  DPO_HeadCalculation::ReadFromFile()
{
    ReadObjectHeader();

    ReadFuncObjRef(inputPressureObjRef);
    ReadFuncObjRef(inputDensityObjRef);
    ReadRealMSSpec(groundSurfaceElevationMS);

    headCalculation = HeadCalculation(ReadInt());
    outputIsElevation = ReadBool();

    CheckForInputFailure("Reading DPO_HeadCalculation");
    return true;
}
size_t PlayerPositionAndLook::deserialize(const Buffer& _src, size_t _offset)
{
	_offset = _pm_checkPacketId(_src, _offset);

	_offset = ReadDouble(_src, _offset, _pf_x);
	_offset = ReadDouble(_src, _offset, _pf_stance);
	_offset = ReadDouble(_src, _offset, _pf_y);
	_offset = ReadDouble(_src, _offset, _pf_z);
	_offset = ReadFloat(_src, _offset, _pf_yaw);
	_offset = ReadFloat(_src, _offset, _pf_pitch);
	_offset = ReadBool(_src, _offset, _pf_onGround);
	_pf_initialized = true;
	return _offset;
}
示例#22
0
bool  DPO_TableRowAccumulate::ReadFromFile()
{
    ReadObjectHeader();
    ReadFuncObjRef(inputTableObjRef);

    skipXColumn     = ReadBool();
    xcolumnIndex    = ReadInt();

    if (currentObjReadMajorVersion > 0)
        tableRowOperation = TableRowOperation(ReadInt());

    CheckForInputFailure("Reading DPO_TableRowAccumulate");
    return true;
}
示例#23
0
bool  DPO_ReadGridData::ReadFromFile()
{
    ReadObjectHeader();

    ReadFileName(gridDataFname);

    if (currentObjReadMajorVersion > 0)
    {
        ReadText(setXID, DC_GridData::gridIDLen);
        ReadText(setYID, DC_GridData::gridIDLen);
        setXLog = ReadBool();
        setYLog = ReadBool();

        if (currentObjReadMajorVersion > 1)
            gridFileFormat = IO_GridData::GridFileFormat(ReadInt());

        if (currentObjReadMajorVersion > 2)
            decimationModulus = ReadInt();
    }

    CheckForInputFailure("Reading DPO_ReadGridData");
    return true;
}
示例#24
0
bool  DPO_TableMath::ReadFromFile()
{
    ReadObjectHeader();
    ReadFuncObjRef(inputTableAObjRef);
    ReadFuncObjRef(inputTableBObjRef);

    skipXColumn     = ReadBool();
    xcolumnIndex    = ReadInt();

    tableMathOperation = TableMathOperation(ReadInt());

    CheckForInputFailure("Reading DPO_TableMath");
    return true;
}
示例#25
0
bool  DPO_ExtractSASteps::ReadFromFile()
{
    ReadObjectHeader();
    ReadFuncObjRef(inputTableObjRef);

    extractByIndexes = ReadBool();
    minIndex = ReadInt();
    maxIndex = ReadInt();
    indexIncrement = ReadInt();
    minValue = ReadDouble();
    maxValue = ReadDouble();

    CheckForInputFailure("Reading DPO_ExtractSASteps");
    return true;
}
示例#26
0
bool  PPO_ColorCubeIsovolume::ReadFromFile()
{
    ReadObjectHeader();
    PPO_Base::ReadFromFile();
    ReadColorBase(*this);

    ReadRealMSSpec(isoValueMS);
    usePen = ReadBool();
    isothermPen = ReadInt();

    exposedisoValue.ReadExposed();

    CheckForInputFailure("Reading PPO_ColorCubeIsovolume");
    return true;
}
void KRegistryKey::ReadBool(const KString& ValueName, bool& bRValue, const bool bDefaultValue) const
{
	DEBUG_VERIFY_ALLOCATION;

	DEBUG_VERIFY(IsOpen());

	try
	{
		ReadBool(ValueName, bRValue);
	}

	catch(...)
	{
		bRValue = bDefaultValue;
	}
}
示例#28
0
int ReadSeriesSpec(PSC_SeriesSpec& seriesSpec)
{
    int readVer = ReadInt();

    seriesSpec.seriesPlotType   = PlotSymLine(ReadInt());
    seriesSpec.seriesPen        = ReadInt();
    seriesSpec.symbolType       = PlotSymbol(ReadInt());
    seriesSpec.symbolSize       = ReadInt();
    seriesSpec.lineThickness    = ReadInt();
    seriesSpec.lineType         = PlotLineType(ReadInt());

    if (readVer > 0)
        seriesSpec.mitreLines = ReadBool();

    return readVer;
}
示例#29
0
bool  DPO_CubeExtractGrid::ReadFromFile()
{
    ReadObjectHeader();

    ReadFuncObjRef(cubeInputObjRef);

    gridX   = DC_CubeData::ExtractAxes(ReadInt());
    gridY   = DC_CubeData::ExtractAxes(ReadInt());
    logInterp = ReadBool();

    ReadRealMSSpec(extractValMS);
    exposedExtractVal.ReadExposed();

    CheckForInputFailure("Reading DPO_CubeExtractGrid");
    return true;
}
示例#30
0
void LayerStaticSupport::ReadWellBoreZone(WellBoreZone& inWBZ)
{
  char temp[IntervalBase::intervalIDLen];
  ReadText(temp, IntervalBase::intervalIDLen);
  inWBZ.SetID(temp);
  ReadUnitReal(inWBZ.topDepth);
  ReadUnitReal(inWBZ.topElevation);
  inWBZ.nintervalNodes = ReadInt();

  inWBZ.zoneIsPacker = ReadBool();

  ReadUnitReal(inWBZ.deltaVolume);
  ReadUnitReal(inWBZ.tzComp);

  inWBZ.seqIndex = ReadInt();
}