#6106 Apply clang-format on AppFwk

This commit is contained in:
Magne Sjaastad
2020-06-19 07:53:59 +02:00
parent e2ef6a910b
commit bdc536dfc4
407 changed files with 88976 additions and 42309 deletions

View File

@@ -8,23 +8,22 @@
namespace caf
{
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
bool PdmXmlFieldHandle::assertValid() const
{
if (m_owner->keyword().isEmpty())
if ( m_owner->keyword().isEmpty() )
{
std::cout << "PdmField: Detected use of non-initialized field. Did you forget to do CAF_PDM_InitField() on this field ?\n";
std::cout << "PdmField: Detected use of non-initialized field. Did you forget to do CAF_PDM_InitField() on "
"this field ?\n";
return false;
}
if (!PdmXmlObjectHandle::isValidXmlElementName(m_owner->keyword()))
if ( !PdmXmlObjectHandle::isValidXmlElementName( m_owner->keyword() ) )
{
std::cout << "PdmField: The supplied keyword: \"" << m_owner->keyword().toStdString() << "\" is an invalid XML element name, and will break your file format!\n";
std::cout << "PdmField: The supplied keyword: \"" << m_owner->keyword().toStdString()
<< "\" is an invalid XML element name, and will break your file format!\n";
return false;
}
@@ -32,28 +31,30 @@ bool PdmXmlFieldHandle::assertValid() const
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
PdmXmlFieldHandle::PdmXmlFieldHandle(PdmFieldHandle* owner, bool giveOwnership)
: m_isIOReadable(true), m_isIOWritable(true), m_isCopyable(true)
PdmXmlFieldHandle::PdmXmlFieldHandle( PdmFieldHandle* owner, bool giveOwnership )
: m_isIOReadable( true )
, m_isIOWritable( true )
, m_isCopyable( true )
{
m_owner = owner;
owner->addCapability(this, giveOwnership);
m_owner = owner;
owner->addCapability( this, giveOwnership );
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
void PdmXmlFieldHandle::disableIO()
{
setIOReadable(false);
setIOWritable(false);
setCopyable(false);
setIOReadable( false );
setIOWritable( false );
setCopyable( false );
}
//--------------------------------------------------------------------------------------------------
/// Returns the classKeyword of the child class type, if this field is supposed to contain pointers
/// to PdmObjectHandle derived objects.
/// Returns the classKeyword of the child class type, if this field is supposed to contain pointers
/// to PdmObjectHandle derived objects.
/// Returns typeid(DataType).name() if the field is not containing some PdmObjectHandle type.
/// Warning: typeid(DataType).name() is compiler implementation specific and thus you should not
/// Compare this with a predefined literal, like "double" or "float". Instead compare with typeid(double).name().
@@ -69,10 +70,9 @@ QString PdmXmlFieldHandle::dataTypeName() const
PdmXmlFieldHandle* PdmFieldHandle::xmlCapability()
{
PdmXmlFieldHandle* xmlField = capability<PdmXmlFieldHandle>();
CAF_ASSERT(xmlField);
CAF_ASSERT( xmlField );
return xmlField;
}
} // End of namespace caf