Update of /cvsroot/kuml/kuml/libkuml/mof In directory usw-pr-cvs1:/tmp/cvs-serv21315 Modified Files: Autogen.cpp BUILD ChangeLog Generic.cpp Generic.hh Makefile MofIdlInterfaces.cpp MofIdlInterfaces.hh MofIdlReverseMapper.cpp MofIdlReverseMapper.hh RegularExpression.t.cpp RepoManager.cpp RepoManager.hh RepoManager.t.cpp mCorba.cpp mCorba.hh notes.txt Added Files: KumlUtilities.cpp KumlUtilities.hh Removed Files: RegularExpression.cpp RegularExpression.hh Log Message: 2001-6-25 Gerard Flynn <ger...@fr...> * Fixed MofIdlMapping::InterfaceReverseMapper to preserve attribute ordering by adding attribute vector in addition to attribute map * Hacked MofIdlMapping::InterfaceReverseMapper::createObject to skip attributes of type CORBA::tk_objref, assume these are References 2001-6-30 Gerard Flynn <ger...@fr...> * Fixed repository ID creation for Class attributes in GenericClassProxy::fillInMetaObject * Fixed bug in definition of VisibilityKind type in GenericClassProxy::fillInMetaObject * RepoManager::buildImplementation now runs to completion without error * Corrected Mico prerequisite in BUILD file, >= 2.3.5 required * Renamed RegularExpression.hh and .cpp to KumlUtilities * Began work on mCorba::showTC function for TypeCode display VS: Committing in . VS: VS: Modified Files: VS: Autogen.cpp BUILD ChangeLog Generic.cpp Generic.hh VS: GenericTest.cc GenericTest.h Makefile MofIdlInterfaces.cpp VS: MofIdlInterfaces.hh MofIdlReverseMapper.cpp VS: MofIdlReverseMapper.hh RegularExpression.t.cpp RepoManager.cpp VS: RepoManager.hh RepoManager.t.cpp mCorba.cpp mCorba.hh VS: notes.txt VS: Added Files: VS: KumlUtilities.cpp KumlUtilities.hh VS: Removed Files: VS: RegularExpression.cpp RegularExpression.hh VS: ---------------------------------------------------------------------- ***** Error reading new file: [Errno 2] No such file or directory: 'KumlUtilities.cpp' ***** Error reading new file: [Errno 2] No such file or directory: 'KumlUtilities.hh' Index: Autogen.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/Autogen.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Autogen.cpp 2001/06/22 03:42:03 1.1 --- Autogen.cpp 2001/06/30 07:31:26 1.2 *************** *** 24,52 **** /* ****************************************************************************/ ! /* $Header$ */ // $Id$ - /* ************************************************************************** - Autogen.cc - description - ------------------- - begin : Tue Nov 7 23:35:11 MEST 2000 - - copyright : (C) 2000 by Gerard Flynn - email : ger...@fr... - ***************************************************************************/ - - /* ************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - #include "Autogen.hh" #include "Except.hh" ! #include "RegularExpression.hh" using namespace MofIdlMapping; --- 24,34 ---- /* ****************************************************************************/ ! /* $Header$ */ // $Id$ #include "Autogen.hh" #include "Except.hh" ! #include "KumlUtilities.hh" using namespace MofIdlMapping; Index: BUILD =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/BUILD,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** BUILD 2001/06/22 03:42:03 1.1 --- BUILD 2001/06/30 07:31:26 1.2 *************** *** 11,16 **** http://e2fsprogs.sourceforge.net. ! -mico (version 2.3.3 is known to work but later versions ! should as well) Available from http://www.mico.org. --- 11,16 ---- http://e2fsprogs.sourceforge.net. ! -mico (version 2.3.5 is known to work, version 2.3.3 does not work because ! of a DynamicAny bug). Available from http://www.mico.org. *************** *** 32,34 **** meta objects are created for each of the MOF classes. This is due to a mismatch between the Reflective create_instance operation arguments and the way in which ! attributes are stored by the Generic classes. \ No newline at end of file --- 32,34 ---- meta objects are created for each of the MOF classes. This is due to a mismatch between the Reflective create_instance operation arguments and the way in which ! attributes are stored by the Generic classes. Index: ChangeLog =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ChangeLog 2001/06/22 03:42:03 1.1 --- ChangeLog 2001/06/30 07:31:26 1.2 *************** *** 2,4 **** * Initial checkin * The code currently dies while trying to instantiate meta objects for the MOF ! Reflective implementation \ No newline at end of file --- 2,21 ---- * Initial checkin * The code currently dies while trying to instantiate meta objects for the MOF ! Reflective implementation ! ! 2001-6-25 Gerard Flynn <ger...@fr...> ! * Fixed MofIdlMapping::InterfaceReverseMapper to preserve attribute ordering ! by adding attribute vector in addition to attribute map ! * Hacked MofIdlMapping::InterfaceReverseMapper::createObject to skip ! attributes of type CORBA::tk_objref, assume these are References ! ! 2001-6-30 Gerard Flynn <ger...@fr...> ! * Fixed repository ID creation for Class attributes in ! GenericClassProxy::fillInMetaObject ! * Fixed bug in definition of VisibilityKind type in ! GenericClassProxy::fillInMetaObject ! * RepoManager::buildImplementation now runs to completion without ! error ! * Corrected Mico prerequisite in BUILD file, >= 2.3.5 required ! * Renamed RegularExpression.hh and .cpp to KumlUtilities ! * Began work on mCorba::showTC function for TypeCode display \ No newline at end of file Index: Generic.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/Generic.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Generic.cpp 2001/06/22 03:42:03 1.1 --- Generic.cpp 2001/06/30 07:31:26 1.2 *************** *** 24,28 **** /* ****************************************************************************/ ! /* $Header$ */ #include "Generic.hh" --- 24,28 ---- /* ****************************************************************************/ ! /* $Header$ */ #include "Generic.hh" *************** *** 590,594 **** CORBA::TypeCode_var nameType_tc = ! mCorba::orb->create_alias_tc( "org.omg.mof/Model/NameType:1.0", "NameType", string_tc.in() ); --- 590,594 ---- CORBA::TypeCode_var nameType_tc = ! mCorba::orb->create_alias_tc( "IDL:org.omg.mof/Model/NameType", "NameType", string_tc.in() ); *************** *** 600,604 **** CORBA::TypeCode_var annotationType_tc = ! mCorba::orb->create_alias_tc( "org.omg.mof/Model/AnnotationType:1.0", "AnnotationType", string_tc.in() ); --- 600,604 ---- CORBA::TypeCode_var annotationType_tc = ! mCorba::orb->create_alias_tc( "IDL:org.omg.mof/Model/AnnotationType", "AnnotationType", string_tc.in() ); *************** *** 609,620 **** annotationType_da->insert_string( m_annotation.c_str() ); CORBA::EnumMemberSeq_var members = new CORBA::EnumMemberSeq; members->length( 3 ); members[0] = CORBA::string_dup( "public_vis" ); ! members[2] = CORBA::string_dup( "protected_vis" ); ! members[3] = CORBA::string_dup( "private_vis" ); CORBA::TypeCode_var visibilityKind_tc = ! mCorba::orb->create_enum_tc( "org.omg.mof/Model/VisibilityKind:1.0", "VisibilityKind", members.in() ); --- 609,639 ---- annotationType_da->insert_string( m_annotation.c_str() ); + CORBA::TypeCode_var modelElement_tc = + mCorba::orb->create_interface_tc( "IDL:org.omg.mof/Model/ModelElement", + "ModelElement" ); + + CORBA::TypeCode_var seq_ModelElement_tc = + mCorba::orb->create_sequence_tc( 0, modelElement_tc.in() ); + + CORBA::TypeCode_var ModelElementUList_tc = + mCorba::orb->create_alias_tc( "IDL:org.omg.mof/Model/ModelElementUList", + "ModelElementUlist", + seq_ModelElement_tc.in() ); + + // DynamicAny::DynAny_var contents_da = + // mCorba::theDynAnyFactory-> + // create_dyn_any_from_type_code( ModelElementUList_tc.in() ); + + // DynamicAny::DynSequence_var contents_ds = DynamicAny::DynSequence::_narrow( contents_da ); + // contents_ds->set_length( 0 ); + CORBA::EnumMemberSeq_var members = new CORBA::EnumMemberSeq; members->length( 3 ); members[0] = CORBA::string_dup( "public_vis" ); ! members[1] = CORBA::string_dup( "protected_vis" ); ! members[2] = CORBA::string_dup( "private_vis" ); CORBA::TypeCode_var visibilityKind_tc = ! mCorba::orb->create_enum_tc( "IDL:org.omg.mof/Model/VisibilityKind", "VisibilityKind", members.in() ); *************** *** 659,662 **** --- 678,682 ---- args[0] = *(nameType_da->to_any()); args[1] = *(annotationType_da->to_any()); + // args[2] = *(contents_da->to_any() ); args[2] = is_root_any; args[3] = is_leaf_any; *************** *** 839,842 **** --- 859,892 ---- } + stringVect GenericClassProxy::instanceLevelAttributeNames() + { + stringVect retvect; + featureVect::const_iterator p; + for( p = m_instanceLevelFeatures.begin(); + p != m_instanceLevelFeatures.end(); ++p ) + { + GenericAttribute* attr = dynamic_cast<GenericAttribute*>( (*p)->feature ); + if( attr ) { + retvect.push_back( attr->name() ); + } + } + return retvect; + } + + stringVect GenericClassProxy::classifierLevelAttributeNames() + { + stringVect retvect; + featureVect::const_iterator p; + for( p = m_classifierLevelFeatures.begin(); + p != m_classifierLevelFeatures.end(); ++p ) + { + GenericAttribute* attr = dynamic_cast<GenericAttribute*>( (*p)->feature ); + if( attr ) { + retvect.push_back( attr->name() ); + } + } + return retvect; + } + GenericInstance::GenericInstance( const string& name, GenericClassProxy* proxy, *************** *** 1056,1060 **** --- 1106,1115 ---- bool GenericStructuralFeature::checkType( const Reflective::ValueType& element ) { + cerr << "Call to GenericStructuralFeature::check_type" << endl; CORBA::TypeCode_var tc_element = element.type(); + cerr << "Argument TypeCode : " << endl; + mCorba::showTC( element.type() ); + cerr << "Base TypeCode : " << endl; + mCorba::showTC( &m_base_type ); return m_base_type.equal( tc_element ); *************** *** 1150,1158 **** --- 1205,1217 ---- void GenericValue::set_value( const Reflective::ValueType& new_value ) { + cerr << "Call to GenericValue::set_value" << endl; + cerr << " Feature name : " << p_feature->name() << endl; const Multiplicity* multiplicity = p_feature->multiplicity(); switch( multiplicity->kind() ) { case SINGLE_VALUED: case OPTIONAL_VALUED: + cerr << " non m-value multiplicity" << endl; if( !p_feature->checkType( new_value ) ) { + cerr << "Wrong type in GenericValue::set_value" << endl; throw GenericException( INVALID_PARAMETER ); } *************** *** 1164,1167 **** --- 1223,1227 ---- } else { + cerr << "Wrong size for non m-value attribute in GenericValue::set_value" << endl; throw GenericException( INTERNAL_ERROR ); } *************** *** 1169,1174 **** --- 1229,1236 ---- case MULTI_VALUED: { + cerr << " m-value multiplicity" << endl; DynamicAny::DynAny_var da = mCorba::theDynAnyFactory->create_dyn_any( new_value ); if( !multiplicity->checkBounds( da->component_count() ) ) { + cerr << "Wrong bounds for m-value attribute in GenericValue::set_value" << endl; throw GenericException( INVALID_PARAMETER ); } Index: Generic.hh =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/Generic.hh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Generic.hh 2001/06/22 03:42:03 1.1 --- Generic.hh 2001/06/30 07:31:26 1.2 *************** *** 24,28 **** /* ****************************************************************************/ ! /* $Header$ */ #ifndef Generic_H_IS_INCLUDED --- 24,28 ---- /* ****************************************************************************/ ! /* $Header$ */ #ifndef Generic_H_IS_INCLUDED *************** *** 51,59 **** mapping : GenericBaseObect <=> RefBaseObject ! GenericClassProxy => RefObject ! GenericInstance => RefObject ! GenericAssociation => RefAssociation ! GenericPackage => Refackage ! GenericPackageFactory => RefPackage */ --- 51,59 ---- mapping : GenericBaseObect <=> RefBaseObject ! GenericClassProxy <=> RefObject ! GenericInstance <=> RefObject ! GenericAssociation <=> RefAssociation ! GenericPackage <=> Refackage ! GenericPackageFactory <=> RefPackage */ *************** *** 335,338 **** --- 335,340 ---- }; + typedef vector<string> stringVect; + /* GenericClassProxy and its ssociated classes are intended to *************** *** 390,393 **** --- 392,399 ---- GenericClassProxy* containedClass( const string& name ); + + stringVect instanceLevelAttributeNames(); + + stringVect classifierLevelAttributeNames(); public: // MOF operations. (Value operations implemented in GenericInstance). Index: Makefile =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile 2001/06/22 03:42:03 1.1 --- Makefile 2001/06/30 07:31:26 1.2 *************** *** 27,31 **** MofIdlMapping_t_OBJECTS = MofIdlInterfaces.o MofIdlReverseMapper.o MofIdlMapping.t.o \ ! Generic.o Reflective_impl.o Reflective.o mCorba.o RegularExpression.o \ Autogen.o parsenode.o prepro.o scanner.o parser.o treewalker.o yacc.o --- 27,31 ---- MofIdlMapping_t_OBJECTS = MofIdlInterfaces.o MofIdlReverseMapper.o MofIdlMapping.t.o \ ! Generic.o Reflective_impl.o Reflective.o mCorba.o KumlUtilities.o \ Autogen.o parsenode.o prepro.o scanner.o parser.o treewalker.o yacc.o *************** *** 35,39 **** RepoManager_t_OBJECTS = RepoManager.t.o RepoManager.o MofIdlInterfaces.o \ MofIdlReverseMapper.o Generic.o Reflective_impl.o Reflective.o mCorba.o \ ! RegularExpression.o Autogen.o parsenode.o prepro.o scanner.o \ parser.o treewalker.o yacc.o --- 35,39 ---- RepoManager_t_OBJECTS = RepoManager.t.o RepoManager.o MofIdlInterfaces.o \ MofIdlReverseMapper.o Generic.o Reflective_impl.o Reflective.o mCorba.o \ ! KumlUtilities.o Autogen.o parsenode.o prepro.o scanner.o \ parser.o treewalker.o yacc.o *************** *** 42,49 **** ! RegularExpression.t : RegularExpression.t.o RegularExpression.o g++ -o $@ $^ ! RegularExpression.cpp : RegularExpression.hh MofIdlInterfaces.cpp : MofIdlInterfaces.hh Generic.hh --- 42,49 ---- ! RegularExpression.t : RegularExpression.t.o KumlUtilities.o g++ -o $@ $^ ! KumlUtilities.cpp : KumlUtilities.hh MofIdlInterfaces.cpp : MofIdlInterfaces.hh Generic.hh Index: MofIdlInterfaces.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/MofIdlInterfaces.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MofIdlInterfaces.cpp 2001/06/22 03:42:03 1.1 --- MofIdlInterfaces.cpp 2001/06/30 07:31:26 1.2 *************** *** 24,31 **** /* ****************************************************************************/ ! /* $Header$ */ #include "MofIdlInterfaces.hh" ! #include "RegularExpression.hh" using namespace MofIdlMapping; --- 24,31 ---- /* ****************************************************************************/ ! /* $Header$*/ #include "MofIdlInterfaces.hh" ! #include "KumlUtilities.hh" using namespace MofIdlMapping; Index: MofIdlInterfaces.hh =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/MofIdlInterfaces.hh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MofIdlInterfaces.hh 2001/06/22 03:42:03 1.1 --- MofIdlInterfaces.hh 2001/06/30 07:31:26 1.2 *************** *** 24,28 **** /* ****************************************************************************/ ! /* $Header$ */ #ifndef MofIdlInterfaces_H_IS_INCLUDED --- 24,28 ---- /* ****************************************************************************/ ! /* $Header$*/ #ifndef MofIdlInterfaces_H_IS_INCLUDED Index: MofIdlReverseMapper.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/MofIdlReverseMapper.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MofIdlReverseMapper.cpp 2001/06/22 03:42:03 1.1 --- MofIdlReverseMapper.cpp 2001/06/30 07:31:26 1.2 *************** *** 24,31 **** /* ****************************************************************************/ ! /* $Header$ */ #include "MofIdlReverseMapper.hh" ! #include "RegularExpression.hh" using namespace MofIdlMapping; --- 24,31 ---- /* ****************************************************************************/ ! /* $Header$ */ #include "MofIdlReverseMapper.hh" ! #include "KumlUtilities.hh" using namespace MofIdlMapping; *************** *** 149,158 **** string attrName = opMapper->getAssociatedAttributeName(); attrMap::iterator p = ! m_attributes.find( attrName ); attribute_struct* attr; ! if( p == m_attributes.end() ) { // new attribute attr = new attribute_struct; attr->name = attrName; ! m_attributes[ attr->name ] = attr; } else { // attribute already exists in map. --- 149,159 ---- string attrName = opMapper->getAssociatedAttributeName(); attrMap::iterator p = ! m_attributeMap.find( attrName ); attribute_struct* attr; ! if( p == m_attributeMap.end() ) { // new attribute attr = new attribute_struct; attr->name = attrName; ! m_attributes.push_back( attr ); ! m_attributeMap[ attr->name ] = attr; } else { // attribute already exists in map. *************** *** 191,200 **** string attrName = (*p)->getName(); attrMap::iterator q = ! m_attributes.find( attrName ); attribute_struct* attr; ! if( q == m_attributes.end() ) { // new attribute attr = new attribute_struct; attr->name = attrName; ! m_attributes[ attr->name ] = attr; } else { // attribute already exists in map. --- 192,202 ---- string attrName = (*p)->getName(); attrMap::iterator q = ! m_attributeMap.find( attrName ); attribute_struct* attr; ! if( q == m_attributeMap.end() ) { // new attribute attr = new attribute_struct; attr->name = attrName; ! m_attributes.push_back( attr ); ! m_attributeMap[ attr->name ] = attr; } else { // attribute already exists in map. *************** *** 210,244 **** // This function must only be called from (or after) analyzeOperations. ! for( attrMapIter p = m_attributes.begin(); p != m_attributes.end(); ++p ) { ! // Set attribute properties to known stae. ! p->second->isMultivalued = false; ! p->second->isOrdered = false; ! p->second->isUnique = false; ! p->second->isChangeable = false; ! p->second->isOptional = false; ! ! if( has( p->second, SET ) ) { ! p->second->isChangeable = true; } ! if( has( p->second, UNSET ) ) { ! p->second->isOptional = true; } ! if( has( p->second, ADD ) ) { ! p->second->isMultivalued = true; } ! if( has( p->second, ADD_BEFORE ) ) { ! p->second->isOrdered = true; } ! if( p->second->isOrdered ) { // See Table 5-1, page 5-18 of MOFv1.3 ! if( ! has( p->second, ADD_AT ) ) { ! p->second->isUnique = true; } } ! p->second->base_type = getAttrBaseType( p->second ); ! p->second->collection_type = getAttrCollectionType( p->second ); } --- 212,246 ---- // This function must only be called from (or after) analyzeOperations. ! for( attrVectIter p = m_attributes.begin(); p != m_attributes.end(); ++p ) { ! // Set attribute properties to known state. ! (*p)->isMultivalued = false; ! (*p)->isOrdered = false; ! (*p)->isUnique = false; ! (*p)->isChangeable = false; ! (*p)->isOptional = false; ! ! if( has( (*p), SET ) ) { ! (*p)->isChangeable = true; } ! if( has( (*p), UNSET ) ) { ! (*p)->isOptional = true; } ! if( has( (*p), ADD ) ) { ! (*p)->isMultivalued = true; } ! if( has( (*p), ADD_BEFORE ) ) { ! (*p)->isOrdered = true; } ! if( (*p)->isOrdered ) { // See Table 5-1, page 5-18 of MOFv1.3 ! if( ! has( (*p), ADD_AT ) ) { ! (*p)->isUnique = true; } } ! (*p)->base_type = getAttrBaseType( (*p) ); ! (*p)->collection_type = getAttrCollectionType( (*p) ); } *************** *** 420,430 **** GenericClassProxy* class_proxy = new GenericClassProxy( p_interface->getName(), 0 ); //Add attributes ! for( attrMapIter p = m_attributes.begin(); p != m_attributes.end(); ++p ) { ! attribute_struct* attr = p->second; cerr << "Adding attribute : " << attr->name << endl; cerr << "Before call to createTypeCode (base)" << endl; const CORBA::TypeCode* base_tc = attr->base_type->createTypeCode(); cerr << "After call to createTypeCode (base)" << endl; --- 422,437 ---- GenericClassProxy* class_proxy = new GenericClassProxy( p_interface->getName(), 0 ); //Add attributes ! for( attrVectIter p = m_attributes.begin(); p != m_attributes.end(); ++p ) { ! attribute_struct* attr = *p; cerr << "Adding attribute : " << attr->name << endl; cerr << "Before call to createTypeCode (base)" << endl; + if( attr->base_type->getKind() == CORBA::tk_objref ) { + // If Type is an interface we assume we're dealing with a Reference + // and not an Attribute. (Temporary hack 2001-6-25). + continue; + } const CORBA::TypeCode* base_tc = attr->base_type->createTypeCode(); cerr << "After call to createTypeCode (base)" << endl; Index: MofIdlReverseMapper.hh =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/MofIdlReverseMapper.hh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** MofIdlReverseMapper.hh 2001/06/22 03:42:03 1.1 --- MofIdlReverseMapper.hh 2001/06/30 07:31:26 1.2 *************** *** 24,28 **** /* ****************************************************************************/ ! /* $Header$ */ #ifndef MofIdlReverseMapper_H_IS_INCLUDED --- 24,28 ---- /* ****************************************************************************/ ! /* $Header$ */ #ifndef MofIdlReverseMapper_H_IS_INCLUDED *************** *** 103,106 **** --- 103,110 ---- }; + typedef vector<attribute_struct*> attrVect; + + typedef attrVect::iterator attrVectIter; + typedef map<string,attribute_struct*> attrMap; *************** *** 143,148 **** iface_type m_type; ! attrMap m_attributes; }; // class InterfaceReverseMapper. --- 147,154 ---- iface_type m_type; + + attrVect m_attributes; ! attrMap m_attributeMap; }; // class InterfaceReverseMapper. Index: RegularExpression.t.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/RegularExpression.t.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** RegularExpression.t.cpp 2001/06/22 03:42:04 1.1 --- RegularExpression.t.cpp 2001/06/30 07:31:26 1.2 *************** *** 24,28 **** /* ****************************************************************************/ ! #include "RegularExpression.hh" #include <string> #include <iostream> --- 24,30 ---- /* ****************************************************************************/ ! /* $Header$ */ ! ! #include "KumlUtilities.hh" #include <string> #include <iostream> Index: RepoManager.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/RepoManager.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** RepoManager.cpp 2001/06/22 03:42:04 1.1 --- RepoManager.cpp 2001/06/30 07:31:26 1.2 *************** *** 24,27 **** --- 24,29 ---- /* ****************************************************************************/ + /* $Header$ */ + #include "RepoManager.hh" *************** *** 79,82 **** --- 81,94 ---- assert( MofClass ); assert( MofAttribute ); + + cerr << "MofClass attributes : " << endl; + stringVect class_attr_names = MofClass->instanceLevelAttributeNames(); + for( stringVect::const_iterator p = class_attr_names.begin(); + p != class_attr_names.end(); + ++p ) + { + cerr << " " << *p << endl; + } + // exit( 0 ); classVect classProxies = mof_model_package->allClassProxies(); // Create meta objects for all class proxy's so that we have valid MOF ID's *************** *** 91,95 **** // Now fill in all of the meta object attributes (possible because we now have ! // valid MOF ID's. try { for( classVect::iterator p = classProxies.begin(); --- 103,107 ---- // Now fill in all of the meta object attributes (possible because we now have ! // valid MOF ID's). try { for( classVect::iterator p = classProxies.begin(); Index: RepoManager.hh =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/RepoManager.hh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** RepoManager.hh 2001/06/22 03:42:04 1.1 --- RepoManager.hh 2001/06/30 07:31:26 1.2 *************** *** 24,27 **** --- 24,29 ---- /* ****************************************************************************/ + /* $Header$ */ + #ifndef RepoManager_H_IS_INCLUDED #define RepoManager_H_IS_INCLUDED Index: RepoManager.t.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/RepoManager.t.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** RepoManager.t.cpp 2001/06/22 03:42:04 1.1 --- RepoManager.t.cpp 2001/06/30 07:31:26 1.2 *************** *** 24,28 **** /* ****************************************************************************/ ! /* $Header$ */ #include "RepoManager.hh" --- 24,28 ---- /* ****************************************************************************/ ! /* $Header$ */ #include "RepoManager.hh" Index: mCorba.cpp =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/mCorba.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** mCorba.cpp 2001/06/22 03:42:04 1.1 --- mCorba.cpp 2001/06/30 07:31:26 1.2 *************** *** 24,28 **** /* ****************************************************************************/ ! /* $Header$ */ #include "mCorba.hh" --- 24,28 ---- /* ****************************************************************************/ ! /* $Header$ */ #include "mCorba.hh" *************** *** 251,252 **** --- 251,321 ---- } + void mCorba::showTC( const CORBA::TypeCode_ptr tc ) + { + static const char* kind_name[] = { + "tk_null", + "tk_void", + "tk_short", + "tk_long", + "tk_ushort", + "tk_ulong", + "tk_float", + "tk_double", + "tk_boolean", + "tk_char", + "tk_octet", + "tk_any", + "tk_TypeCode", + "tk_Principal", + "tk_objref", + "tk_struct", + "tk_union", + "tk_enum", + "tk_string", + "tk_sequence", + "tk_array", + "tk_alias", + "tk_except", + "tk_longlong", + "tk_ulonglong", + "tk_longdouble", + "tk_wchar", + "tk_wstring", + "tk_fixed", + "tk_value", + "tk_value_box", + "tk_native", + "tk_abstract_interface" + }; + + // In all cases we start by printing the kind string. + cout << kind_name[ tc->kind() ] << " : "; + + // For Types that have them, we print the name and repository ID + switch( tc->kind() ) { + case CORBA::tk_objref: + case CORBA::tk_struct: + case CORBA::tk_union: + case CORBA::tk_except: + case CORBA::tk_enum: + case CORBA::tk_alias: + cout << " " << tc->name() << "( " << tc->id() << " )" << endl; + default: + cout << endl; + break; + } + + switch( tc->kind() ) { + case CORBA::tk_enum: + cout << " Enum members :" << endl; + for( int i = 0; i < tc->member_count(); i++ ) { + cout << " " << tc->member_name(i) << endl; + } + break; + default: + break; + } + + + + } Index: mCorba.hh =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/mCorba.hh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** mCorba.hh 2001/06/22 03:42:04 1.1 --- mCorba.hh 2001/06/30 07:31:26 1.2 *************** *** 24,28 **** /* ****************************************************************************/ ! /* $Header$ */ #ifndef mCorba_H_IS_INCLUDED --- 24,28 ---- /* ****************************************************************************/ ! /* $Header$ */ #ifndef mCorba_H_IS_INCLUDED *************** *** 60,63 **** --- 60,65 ---- static void stripspace( string& chaine ); + + static void showTC( const CORBA::TypeCode_ptr tc ); private: mCorba(); Index: notes.txt =================================================================== RCS file: /cvsroot/kuml/kuml/libkuml/mof/notes.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** notes.txt 2001/06/22 03:42:04 1.1 --- notes.txt 2001/06/30 07:31:26 1.2 *************** *** 109,111 **** a mismatch between the create_instance arguments as defined by the MOF spec and the attributes that classes actually contain. Will ! have to go back to the MOF spec to figure out what is going on. \ No newline at end of file --- 109,133 ---- a mismatch between the create_instance arguments as defined by the MOF spec and the attributes that classes actually contain. Will ! have to go back to the MOF spec to figure out what is going on. ! ! 2001-6-24 ! ! There are several problems with the manner in which attributes ! are handled: ! ! 1) The IDL mapper doesn't distingush between References and ! Attributes. In fact until now I had assumed that all MOF ! classes only contained attributes therefore the ! MofIdlReverseMapper has no provisions whatsoever for handling ! references. ! ! 2) The ordering of attributes within an interface is not ! maintained. In addition we must verify that the order ! of appearance of attributes in the IDL interfaces does ! in fact correspond to the order the Reflective interfaces ! should use. ! ! 3) It appears that the order of attributes from different ! super-classes is not consistent either. (contents appearing ! before annotation in Class). ! --- RegularExpression.cpp DELETED --- --- RegularExpression.hh DELETED --- |