Logo Search packages:      
Sourcecode: massxpert version File versions

bool massXpert::CleaveSpec::validate (  ) 

Validates the cleavage specification.

Returns:
true if validation is successful, false otherwise.

Definition at line 421 of file cleaveSpec.cpp.

References massXpert::PolChemDefEntity::m_name, m_pattern, m_ruleList, and parse().

Referenced by renderXmlClsElement().

  {
    if (m_name.isEmpty())
      return false;

    if (m_pattern.isEmpty())
      return false;

  
    if (parse() == -1)
      return false;
  
    // If there are rules, we have to check them all.

    for (int iter = 0; iter < m_ruleList.size(); ++iter)
      {
      if(!m_ruleList.at(iter)->validate())
        return false;
      }

    return true;
  }


Generated by  Doxygen 1.6.0   Back to index