FX_BOOL CPDF_Object::IsIdentical(CPDF_Object* pOther) const { if (this == pOther) return TRUE; if (!pOther) return FALSE; if (pOther->m_Type != m_Type) { if (IsReference() && GetDirect()) return GetDirect()->IsIdentical(pOther); if (pOther->IsReference()) return IsIdentical(pOther->GetDirect()); return FALSE; } switch (m_Type) { case PDFOBJ_BOOLEAN: return AsBoolean()->Identical(pOther->AsBoolean()); case PDFOBJ_NUMBER: return AsNumber()->Identical(pOther->AsNumber()); case PDFOBJ_STRING: return AsString()->Identical(pOther->AsString()); case PDFOBJ_NAME: return AsName()->Identical(pOther->AsName()); case PDFOBJ_ARRAY: return AsArray()->Identical(pOther->AsArray()); case PDFOBJ_DICTIONARY: return AsDictionary()->Identical(pOther->AsDictionary()); case PDFOBJ_NULL: return TRUE; case PDFOBJ_STREAM: return AsStream()->Identical(pOther->AsStream()); case PDFOBJ_REFERENCE: return AsReference()->Identical(pOther->AsReference()); } return FALSE; }
void PHPEntityVariable::PrintStdout(int indent) const { wxString indentString(' ', indent); wxPrintf("%s%s: %s", indentString, IsMember() ? "Member" : "Variable", GetShortName()); if(!GetTypeHint().IsEmpty()) { wxPrintf(", TypeHint: %s", GetTypeHint()); } if(!GetExpressionHint().IsEmpty()) { wxPrintf(", ExpressionHint: %s", GetExpressionHint()); } if(IsReference()) { wxPrintf(", Reference"); } if(!GetDefaultValue().IsEmpty()) { wxPrintf(", Default: %s", GetDefaultValue()); } wxPrintf(", Ln. %d", GetLine()); wxPrintf("\n"); PHPEntityBase::List_t::const_iterator iter = m_children.begin(); for(; iter != m_children.end(); ++iter) { (*iter)->PrintStdout(indent + 4); } }
wxString PHPEntityVariable::ToFuncArgString() const { if(!IsFunctionArg()) { return ""; } wxString str; if(!GetTypeHint().IsEmpty()) { str << GetTypeHint() << " "; } if(IsReference()) { str << "&"; } str << GetShortName(); if(!GetDefaultValue().IsEmpty()) { str << " = " << GetDefaultValue(); } return str; }
DDS_StdString be_TypeMap::MakeSignature(VarType vt, const DDS_StdString& className) const { DDS_StdString ret; if (IsConst(vt)) { ret = "const "; } ret += BE_Globals::RelativeScope(className, VarTypeName(vt)); for (int i = 0; i < LevelsOfIndirection(vt); i++) { ret += "*"; } if (IsReference(vt)) { ret += "&"; } return ret; }
const CPDF_Reference* CPDF_Object::AsReference() const { return IsReference() ? static_cast<const CPDF_Reference*>(this) : nullptr; }