Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsSchemaAttributes.cpp File Reference
#include "nsSchemaPrivate.h"

Go to the source code of this file.

Functions

 NS_IMPL_ISUPPORTS3_CI (nsSchemaAttribute, nsISchemaComponent, nsISchemaAttributeComponent, nsISchemaAttribute) NS_IMETHODIMP nsSchemaAttribute
 NS_IMPL_ISUPPORTS3_CI (nsSchemaAttributeRef, nsISchemaComponent, nsISchemaAttributeComponent, nsISchemaAttribute) NS_IMETHODIMP nsSchemaAttributeRef
 NS_IMPL_ISUPPORTS3_CI (nsSchemaAttributeGroup, nsISchemaComponent, nsISchemaAttributeComponent, nsISchemaAttributeGroup) NS_IMETHODIMP nsSchemaAttributeGroup
 NS_IMPL_ISUPPORTS3_CI (nsSchemaAttributeGroupRef, nsISchemaComponent, nsISchemaAttributeComponent, nsISchemaAttributeGroup) NS_IMETHODIMP nsSchemaAttributeGroupRef
 NS_IMPL_ISUPPORTS3_CI (nsSchemaAnyAttribute, nsISchemaComponent, nsISchemaAttributeComponent, nsISchemaAnyAttribute) NS_IMETHODIMP nsSchemaAnyAttribute

Function Documentation

Definition at line 56 of file nsSchemaAttributes.cpp.

{
  if (mIsResolved) {
    return NS_OK;
  }

  mIsResolved = PR_TRUE;
  nsresult rv = NS_OK;
  if (mType && mSchema) {
    nsCOMPtr<nsISchemaType> type;
    rv = mSchema->ResolveTypePlaceholder(aErrorHandler, mType, getter_AddRefs(type));
    if (NS_FAILED(rv)) {
      return NS_ERROR_FAILURE;
    }
    mType = do_QueryInterface(type);
    if (!mType) {
      return NS_ERROR_FAILURE;
    }
    rv = mType->Resolve(aErrorHandler);
  }

  return rv;
}

Here is the call graph for this function:

Definition at line 209 of file nsSchemaAttributes.cpp.

{
  nsresult rv = NS_OK;
  if (mIsResolved) {
    return NS_OK;
  }
  
  mIsResolved = PR_TRUE;
  if (!mAttribute && mSchema) {
    if (mRefNS.IsEmpty()) {
    mSchema->GetAttributeByName(mRef, getter_AddRefs(mAttribute));
    } else {
      // use the namespace and type
      nsCOMPtr<nsISchemaCollection> schemaColl;
      mSchema->GetCollection(getter_AddRefs(schemaColl));
      NS_ENSURE_STATE(schemaColl);

      schemaColl->GetAttribute(mRef, mRefNS, getter_AddRefs(mAttribute));
    }
  }

  if (mAttribute) {
    rv = mAttribute->Resolve(aErrorHandler);
  }

  return rv;
}

Here is the call graph for this function:

Definition at line 359 of file nsSchemaAttributes.cpp.

{
  if (mIsResolved) {
    return NS_OK;
  }

  mIsResolved = PR_TRUE;
  nsresult rv;
  PRUint32 i, count;

  count = mAttributes.Count();
  for (i = 0; i < count; ++i) {
    rv = mAttributes.ObjectAt(i)->Resolve(aErrorHandler);
    if (NS_FAILED(rv)) {
      return rv;
    }
  }
  
  return NS_OK;
}

Definition at line 497 of file nsSchemaAttributes.cpp.

{
  nsresult rv = NS_OK;
  if (mIsResolved) {
    return NS_OK;
  }

  mIsResolved = PR_TRUE;
  if (!mAttributeGroup && mSchema) {
    if (mRefNS.IsEmpty()) {
    mSchema->GetAttributeGroupByName(mRef, getter_AddRefs(mAttributeGroup));
    } else {
      // use the namespace and type
      nsCOMPtr<nsISchemaCollection> schemaColl;
      mSchema->GetCollection(getter_AddRefs(schemaColl));
      NS_ENSURE_STATE(schemaColl);

      // get the right schema
      nsCOMPtr<nsISchema> schema;
      schemaColl->GetSchema(mRefNS, getter_AddRefs(schema));
      NS_ENSURE_STATE(schema);

      schema->GetAttributeGroupByName(mRef, getter_AddRefs(mAttributeGroup));
    }
  }

  if (mAttributeGroup) {
    rv = mAttributeGroup->Resolve(aErrorHandler);
  }
  
  return rv;
}

Here is the call graph for this function:

Definition at line 631 of file nsSchemaAttributes.cpp.

{
  return NS_OK;
}