Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Public Attributes | Protected Attributes
nsSchemaElement Class Reference

#include <nsSchemaPrivate.h>

Inheritance diagram for nsSchemaElement:
Inheritance graph
[legend]
Collaboration diagram for nsSchemaElement:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { NILLABLE = 1 << 1 }
enum  { ABSTRACT = 1 << 2 }
enum  { FORM_QUALIFIED = 1 << 3 }

Public Member Functions

 nsSchemaElement (nsSchema *aSchema, const nsAString &aName)
virtual ~nsSchemaElement ()
NS_DECL_ISUPPORTS
NS_IMPL_NSISCHEMAPARTICLE_USING_BASE
NS_DECL_NSISCHEMAELEMENT
NS_IMETHOD 
GetTargetNamespace (nsAString &aTargetNamespace)
NS_IMETHOD Resolve (nsIWebServiceErrorHandler *aErrorHandler)
NS_IMETHOD Clear ()
NS_IMETHOD SetType (nsISchemaType *aType)
NS_IMETHOD SetConstraints (const nsAString &aDefaultValue, const nsAString &aFixedValue)
NS_IMETHOD SetFlags (PRInt32 aFlags)
NS_IMETHOD GetMinOccurs (PRUint32 *aMinOccurs)
NS_IMETHOD GetMaxOccurs (PRUint32 *aMaxOccurs)
NS_IMETHOD SetMinOccurs (PRUint32 aMinOccurs)
NS_IMETHOD SetMaxOccurs (PRUint32 aMaxOccurs)
void resolve (in nsIWebServiceErrorHandler aErrorHandler)
void clear ()

Public Attributes

readonly attribute nsISchemaType type
readonly attribute AString defaultValue
readonly attribute AString fixedValue
readonly attribute boolean nillable
readonly attribute boolean abstract
const unsigned short PARTICLE_TYPE_ELEMENT = 1
const unsigned short PARTICLE_TYPE_MODEL_GROUP = 2
const unsigned short PARTICLE_TYPE_ANY = 3
const PRUint32 OCCURRENCE_UNBOUNDED = 0xFFFFFFFF
readonly attribute AString name
readonly attribute unsigned short particleType
readonly attribute PRUint32 minOccurs
readonly attribute PRUint32 maxOccurs
readonly attribute AString targetNamespace

Protected Attributes

nsString mName
nsCOMPtr< nsISchemaTypemType
nsString mDefaultValue
nsString mFixedValue
PRUint8 mFlags
PRUint32 mMinOccurs
PRUint32 mMaxOccurs
nsSchemamSchema
PRPackedBool mIsResolved
PRPackedBool mIsCleared

Detailed Description

Definition at line 373 of file nsSchemaPrivate.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
NILLABLE 

Definition at line 377 of file nsSchemaPrivate.h.

{ NILLABLE       = 1 << 1 };
anonymous enum
Enumerator:
ABSTRACT 

Definition at line 378 of file nsSchemaPrivate.h.

{ ABSTRACT       = 1 << 2 };
anonymous enum
Enumerator:
FORM_QUALIFIED 

Definition at line 379 of file nsSchemaPrivate.h.

{ FORM_QUALIFIED = 1 << 3 };

Constructor & Destructor Documentation

nsSchemaElement::nsSchemaElement ( nsSchema aSchema,
const nsAString &  aName 
)

Definition at line 519 of file nsSchemaParticles.cpp.

  : nsSchemaParticleBase(aSchema), mName(aName), mFlags(0)
{
}

Definition at line 525 of file nsSchemaParticles.cpp.

{
}

Member Function Documentation

Definition at line 560 of file nsSchemaParticles.cpp.

{
  if (mIsCleared) {
    return NS_OK;
  }

  mIsCleared = PR_TRUE;
  if (mType) {
    mType->Clear();
    mType = nsnull;
  }

  return NS_OK;
}

Definition at line 66 of file nsSchemaParticles.cpp.

{
  NS_ENSURE_ARG_POINTER(aMaxOccurs);

  *aMaxOccurs = mMaxOccurs;

  return NS_OK;
}

Definition at line 56 of file nsSchemaParticles.cpp.

{
  NS_ENSURE_ARG_POINTER(aMinOccurs);

  *aMinOccurs = mMinOccurs;

  return NS_OK;
}
NS_IMETHODIMP nsSchemaElement::GetTargetNamespace ( nsAString &  aTargetNamespace)

Reimplemented from nsSchemaComponentBase.

Definition at line 672 of file nsSchemaParticles.cpp.

{
  if ((mFlags & nsSchemaElement::FORM_QUALIFIED) && mSchema) {
    return mSchema->GetTargetNamespace(aTargetNamespace);
  }
  aTargetNamespace.Truncate();
  return NS_OK;
}
NS_IMETHODIMP nsSchemaElement::SetConstraints ( const nsAString &  aDefaultValue,
const nsAString &  aFixedValue 
)

Definition at line 655 of file nsSchemaParticles.cpp.

{
  mDefaultValue.Assign(aDefaultValue);
  mFixedValue.Assign(aFixedValue);

  return NS_OK;
}

Here is the caller graph for this function:

Definition at line 665 of file nsSchemaParticles.cpp.

{
  mFlags = aFlags;
  return NS_OK;
}

Here is the caller graph for this function:

Definition at line 88 of file nsSchemaParticles.cpp.

{
  mMaxOccurs = aMaxOccurs;

  if (mMinOccurs > mMaxOccurs) {
    mMinOccurs = mMaxOccurs;
  }

  return NS_OK;
}

Here is the caller graph for this function:

Definition at line 76 of file nsSchemaParticles.cpp.

{
  mMinOccurs = aMinOccurs;

  if (mMaxOccurs < mMinOccurs) {
    mMaxOccurs = mMinOccurs;
  }

  return NS_OK;
}

Here is the caller graph for this function:

Definition at line 645 of file nsSchemaParticles.cpp.

{
  NS_ENSURE_ARG_POINTER(aType);

  mType = aType;

  return NS_OK;
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 282 of file nsISchema.idl.

readonly attribute AString nsISchemaElement::defaultValue [inherited]

Definition at line 278 of file nsISchema.idl.

readonly attribute AString nsISchemaElement::fixedValue [inherited]

Definition at line 279 of file nsISchema.idl.

Definition at line 245 of file nsISchema.idl.

Definition at line 399 of file nsSchemaPrivate.h.

Definition at line 400 of file nsSchemaPrivate.h.

Definition at line 401 of file nsSchemaPrivate.h.

Definition at line 244 of file nsISchema.idl.

Definition at line 123 of file nsSchemaPrivate.h.

Definition at line 122 of file nsSchemaPrivate.h.

Definition at line 293 of file nsSchemaPrivate.h.

Definition at line 292 of file nsSchemaPrivate.h.

Definition at line 397 of file nsSchemaPrivate.h.

nsSchema* nsSchemaComponentBase::mSchema [protected, inherited]

Definition at line 120 of file nsSchemaPrivate.h.

Definition at line 398 of file nsSchemaPrivate.h.

readonly attribute AString nsISchemaParticle::name [inherited]

Definition at line 241 of file nsISchema.idl.

Definition at line 281 of file nsISchema.idl.

Definition at line 239 of file nsISchema.idl.

const unsigned short nsISchemaParticle::PARTICLE_TYPE_ANY = 3 [inherited]

Definition at line 237 of file nsISchema.idl.

const unsigned short nsISchemaParticle::PARTICLE_TYPE_ELEMENT = 1 [inherited]

Definition at line 235 of file nsISchema.idl.

const unsigned short nsISchemaParticle::PARTICLE_TYPE_MODEL_GROUP = 2 [inherited]

Definition at line 236 of file nsISchema.idl.

readonly attribute unsigned short nsISchemaParticle::particleType [inherited]

Definition at line 242 of file nsISchema.idl.

readonly attribute AString nsISchemaComponent::targetNamespace [inherited]

Definition at line 75 of file nsISchema.idl.

Definition at line 276 of file nsISchema.idl.


The documentation for this class was generated from the following files: