/*
* SchemaAttributeGroup.h
* Copyright (c) 2011 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// SOL9
// 2011/02/06
#pragma once
#include <sol/xml/SchemaItem.h>
#include <sol/xml/SchemaAny.h>
#include <sol/xml/SchemaItemCollection.h>
namespace SOL {
class SchemaAttributeGroup : public SchemaItem
{
public:
SchemaAttributeGroup(MSXML2::ISchemaAttributeGroupPtr pGroup)
:SchemaItem((MSXML2::ISchemaItemPtr)pGroup)
{
}
public:
MSXML2::ISchemaAttributeGroupPtr getGroupPtr()
{
return(MSXML2::ISchemaAttributeGroupPtr)SchemaItem::getItemPtr();
}
MSXML2::ISchemaAnyPtr getAnyAttribute()
{
return getGroupPtr()->GetanyAttribute();
}
MSXML2::ISchemaItemCollectionPtr getAttributes()
{
return getGroupPtr()->Getattributes();
}
public:
void display(const TCHAR* name=NULL)
{
if (name ==NULL) {
name = _T("SchemaAttributeGroup");
}
_tprintf(_T("<%s>\n"), name);
try {
SchemaAny any = getAnyAttribute();
any.display();
} catch (...) {
}
try {
SchemaItemCollection collection = getAttributes();
collection.display(_T("Attributes"));
} catch (...) {
}
_tprintf(_T("</%s>\n"), name);
}
};
}
|