SOL9 2.0 Class: SchemaAttributeGroup

 SOL9 C++ Class Library  SOL9 Samples  SOL9 Tutorial  SOL9 FAQ  SOL9 ClassTree 

Source code

/*
 * 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);

    }

};


}

Last modified: 1 Feb 2012

Copyright (c) 2009-2012 Antillia.com ALL RIGHTS RESERVED.