public ProtocolBufferClassHierarchy(ClassHierarchyProto.Node root)
        {
            this.rootNode = new PackageNodeImpl();
            if (root.package_node == null)
            {
                throw new ArgumentException("Expected a package node.  Got: " + root);
            }
            // Register all the classes.
            foreach (ClassHierarchyProto.Node child in root.children)
            {
                ParseSubHierarchy(rootNode, child);
            }

            // Now, register the implementations
            foreach (ClassHierarchyProto.Node child in root.children)
            {
                WireUpInheritanceRelationships(child);
            }
        }
        public ProtocolBufferClassHierarchy(ClassHierarchyProto.Node root)
        {
            this.rootNode = new PackageNodeImpl();
            if (root.package_node == null)
            {
                throw new ArgumentException("Expected a package node.  Got: " + root);
            }
            // Register all the classes.
            foreach (ClassHierarchyProto.Node child in root.children)
            {
                ParseSubHierarchy(rootNode, child);
            }

            // Now, register the implementations
            foreach (ClassHierarchyProto.Node child in root.children)
            {
                WireUpInheritanceRelationships(child);
            }
        }
Example #3
0
        /// <summary>
        /// Convert AvroNode into AvroClassHierarchy object
        /// </summary>
        /// <param name="root"></param>
        internal AvroClassHierarchy(AvroNode root)
        {
            _rootNode = new PackageNodeImpl();
            if (root.packageNode == null)
            {
                Utilities.Diagnostics.Exceptions.Throw(new ArgumentException("Expected a package node.  Got: " + root), LOGGER);
            }

            foreach (AvroNode child in root.children)
            {
                ParseSubHierarchy(_rootNode, child);
            }

            BuildHashTable(_rootNode);

            foreach (AvroNode child in root.children)
            {
                WireUpInheritanceRelationships(child);
            }
        }
        /// <summary>
        /// Convert AvroNode into AvroClassHierarchy object
        /// </summary>
        /// <param name="root"></param>
        internal AvroClassHierarchy(AvroNode root)
        {
            _rootNode = new PackageNodeImpl();
            if (root.packageNode == null)
            {
                Utilities.Diagnostics.Exceptions.Throw(new ArgumentException("Expected a package node.  Got: " + root), LOGGER); 
            }

            foreach (AvroNode child in root.children)
            {
                ParseSubHierarchy(_rootNode, child);
            }
            
            BuildHashTable(_rootNode);

            foreach (AvroNode child in root.children)
            {
                WireUpInheritanceRelationships(child);
            }
        }
        public ProtocolBufferClassHierarchy(Org.Apache.REEF.Tang.Protobuf.Node root)
        {
            this.rootNode = new PackageNodeImpl();
            if (root.package_node == null)
            {
                Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw(new ArgumentException("Expected a package node.  Got: " + root), LOGGER);
            }
            // Register all the classes.
            foreach (Org.Apache.REEF.Tang.Protobuf.Node child in root.children)
            {
                ParseSubHierarchy(rootNode, child);
            }

            BuildHashTable(rootNode);

            foreach (Org.Apache.REEF.Tang.Protobuf.Node child in root.children)
            {
                WireUpInheritanceRelationships(child);
            }
        }
 // create a ProtocolBufferClassHierarchy with empty nodes and lookup table. It can be used to merge other class hierarchy to it
 public ProtocolBufferClassHierarchy()
 {
     this.rootNode = new PackageNodeImpl();
 }
Example #7
0
 /// <summary>
 /// create a AvroClassHierarchy with empty nodes and lookup table. It can be used to merge other class hierarchy to it
 /// </summary>
 internal AvroClassHierarchy()
 {
     _rootNode = new PackageNodeImpl();
 }
 /// <summary>
 /// create a AvroClassHierarchy with empty nodes and lookup table. It can be used to merge other class hierarchy to it
 /// </summary>
 internal AvroClassHierarchy()
 {
     _rootNode = new PackageNodeImpl();
 }
        public ProtocolBufferClassHierarchy(Node root)
        {
            this.rootNode = new PackageNodeImpl();
            if (root.package_node == null)
            {
                Utilities.Diagnostics.Exceptions.Throw(new ArgumentException("Expected a package node.  Got: " + root), LOGGER); 
            }

            // Register all the classes.
            foreach (Node child in root.children)
            {
                ParseSubHierarchy(rootNode, child);
            }
            
            BuildHashTable(rootNode);

            foreach (Node child in root.children)
            {
                WireUpInheritanceRelationships(child);
            }
        }
 // create a ProtocolBufferClassHierarchy with empty nodes and lookup table. It can be used to merge other class hierarchy to it
 public ProtocolBufferClassHierarchy()
 {
     this.rootNode = new PackageNodeImpl();
 }
 public ProtocolBufferClassHierarchy()  //create a ProtocolBufferClassHierarchy with empty nodes and lookup table. It can be used to merge other class hierarchy to it
 {
     this.rootNode = new PackageNodeImpl();
 }
 public ProtocolBufferClassHierarchy()  //create a ProtocolBufferClassHierarchy with empty nodes and lookup table. It can be used to merge other class hierarchy to it
 {
     this.rootNode = new PackageNodeImpl();
 }