Пример #1
0
OBSpectrophore::OBSpectrophore(void)
:  _resolution(3.0)
,  _beginProbe(0)
,  _endProbe(0)
,  _numberOfProbes(0)
,  _property(NULL)
,  _radii(NULL)
,  _oricoor(NULL)
,  _coor(NULL)
{
   SetAccuracy(OBSpectrophore::AngStepSize20);
   SetStereo(OBSpectrophore::NoStereoSpecificProbes);
   SetNormalization(OBSpectrophore::NoNormalization);
}
Пример #2
0
OBSpectrophore::OBSpectrophore(const OBSpectrophore& s)
:  _resolution(s._resolution)
,  _beginProbe(s._beginProbe)
,  _endProbe(s._endProbe)
,  _numberOfProbes(s._numberOfProbes)
,  _spectro(s._spectro)
,  _property(NULL)
,  _radii(NULL)
,  _oricoor(NULL)
,  _coor(NULL)
{
   SetAccuracy(s.GetAccuracy());
   SetStereo(s.GetStereo());
   SetNormalization(s.GetNormalization());
}
Пример #3
0
OBSpectrophore&
OBSpectrophore::operator=(const OBSpectrophore& s)
{
   if (this != &s)
   {
      _resolution = s._resolution;
      _accuracy = s._accuracy;
      _beginProbe = s._beginProbe;
      _endProbe = s._endProbe;
      _numberOfProbes = s._numberOfProbes;
      _spectro = s._spectro;
      SetAccuracy(s.GetAccuracy());
      SetStereo(s.GetStereo());
      SetNormalization(s.GetNormalization());
   }
   return *this;
}
void
SaveWindowAttributes::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("SaveWindowAttributes");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("outputToCurrentDirectory")) != 0)
        SetOutputToCurrentDirectory(node->AsBool());
    if((node = searchNode->GetNode("outputDirectory")) != 0)
        SetOutputDirectory(node->AsString());
    if((node = searchNode->GetNode("fileName")) != 0)
        SetFileName(node->AsString());
    if((node = searchNode->GetNode("family")) != 0)
        SetFamily(node->AsBool());
    if((node = searchNode->GetNode("format")) != 0)
    {
        // Allow enums to be int or string in the config file
        if(node->GetNodeType() == INT_NODE)
        {
            int ival = node->AsInt();
            if(ival >= 0 && ival < 14)
                SetFormat(FileFormat(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            FileFormat value;
            if(FileFormat_FromString(node->AsString(), value))
                SetFormat(value);
        }
    }
    if((node = searchNode->GetNode("width")) != 0)
        SetWidth(node->AsInt());
    if((node = searchNode->GetNode("height")) != 0)
        SetHeight(node->AsInt());
    if((node = searchNode->GetNode("screenCapture")) != 0)
        SetScreenCapture(node->AsBool());
    if((node = searchNode->GetNode("saveTiled")) != 0)
        SetSaveTiled(node->AsBool());
    if((node = searchNode->GetNode("quality")) != 0)
        SetQuality(node->AsInt());
    if((node = searchNode->GetNode("progressive")) != 0)
        SetProgressive(node->AsBool());
    if((node = searchNode->GetNode("binary")) != 0)
        SetBinary(node->AsBool());
    if((node = searchNode->GetNode("lastRealFilename")) != 0)
        SetLastRealFilename(node->AsString());
    if((node = searchNode->GetNode("stereo")) != 0)
        SetStereo(node->AsBool());
    if((node = searchNode->GetNode("compression")) != 0)
    {
        // Allow enums to be int or string in the config file
        if(node->GetNodeType() == INT_NODE)
        {
            int ival = node->AsInt();
            if(ival >= 0 && ival < 4)
                SetCompression(CompressionType(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            CompressionType value;
            if(CompressionType_FromString(node->AsString(), value))
                SetCompression(value);
        }
    }
    if((node = searchNode->GetNode("forceMerge")) != 0)
        SetForceMerge(node->AsBool());
    if((node = searchNode->GetNode("resConstraint")) != 0)
    {
        // Allow enums to be int or string in the config file
        if(node->GetNodeType() == INT_NODE)
        {
            int ival = node->AsInt();
            if(ival >= 0 && ival < 3)
                SetResConstraint(ResConstraint(ival));
        }
        else if(node->GetNodeType() == STRING_NODE)
        {
            ResConstraint value;
            if(ResConstraint_FromString(node->AsString(), value))
                SetResConstraint(value);
        }
    }
    if((node = searchNode->GetNode("advancedMultiWindowSave")) != 0)
        SetAdvancedMultiWindowSave(node->AsBool());
    if((node = searchNode->GetNode("subWindowAtts")) != 0)
        subWindowAtts.SetFromNode(node);
}