code
stringlengths
4
1.01M
language
stringclasses
2 values
/* * Copyright (C) 2013 Leszek Mzyk * Modifications Copyright (C) 2015 eccyan <[email protected]> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.eccyan.widget; import android.content.Context; import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.util.AttributeSet; /** * A ViewPager subclass enabling infinte scrolling of the viewPager elements * * When used for paginating views (in opposite to fragments), no code changes * should be needed only change xml's from <android.support.v4.view.ViewPager> * to <com.imbryk.viewPager.LoopViewPager> * * If "blinking" can be seen when paginating to first or last view, simply call * seBoundaryCaching( true ), or change DEFAULT_BOUNDARY_CASHING to true * * When using a FragmentPagerAdapter or FragmentStatePagerAdapter, * additional changes in the adapter must be done. * The adapter must be prepared to create 2 extra items e.g.: * * The original adapter creates 4 items: [0,1,2,3] * The modified adapter will have to create 6 items [0,1,2,3,4,5] * with mapping realPosition=(position-1)%count * [0->3, 1->0, 2->1, 3->2, 4->3, 5->0] */ public class SpinningViewPager extends ViewPager { private static final boolean DEFAULT_BOUNDARY_CASHING = false; OnPageChangeListener mOuterPageChangeListener; private LoopPagerAdapterWrapper mAdapter; private boolean mBoundaryCaching = DEFAULT_BOUNDARY_CASHING; /** * helper function which may be used when implementing FragmentPagerAdapter * * @param position * @param count * @return (position-1)%count */ public static int toRealPosition( int position, int count ){ position = position-1; if( position < 0 ){ position += count; }else{ position = position%count; } return position; } /** * If set to true, the boundary views (i.e. first and last) will never be destroyed * This may help to prevent "blinking" of some views * * @param flag */ public void setBoundaryCaching(boolean flag) { mBoundaryCaching = flag; if (mAdapter != null) { mAdapter.setBoundaryCaching(flag); } } @Override public void setAdapter(PagerAdapter adapter) { mAdapter = new LoopPagerAdapterWrapper(adapter); mAdapter.setBoundaryCaching(mBoundaryCaching); super.setAdapter(mAdapter); } @Override public PagerAdapter getAdapter() { return mAdapter != null ? mAdapter.getRealAdapter() : mAdapter; } @Override public int getCurrentItem() { return mAdapter != null ? mAdapter.toRealPosition(super.getCurrentItem()) : 0; } public void setCurrentItem(int item, boolean smoothScroll) { int realItem = mAdapter.toInnerPosition(item); super.setCurrentItem(realItem, smoothScroll); } @Override public void setCurrentItem(int item) { if (getCurrentItem() != item) { setCurrentItem(item, true); } } @Override public void setOnPageChangeListener(OnPageChangeListener listener) { mOuterPageChangeListener = listener; }; public SpinningViewPager(Context context) { super(context); init(); } public SpinningViewPager(Context context, AttributeSet attrs) { super(context, attrs); init(); } private void init() { super.setOnPageChangeListener(onPageChangeListener); } private OnPageChangeListener onPageChangeListener = new OnPageChangeListener() { private float mPreviousOffset = -1; private float mPreviousPosition = -1; @Override public void onPageSelected(int position) { int realPosition = mAdapter.toRealPosition(position); if (mPreviousPosition != realPosition) { mPreviousPosition = realPosition; if (mOuterPageChangeListener != null) { mOuterPageChangeListener.onPageSelected(realPosition); } } } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { int realPosition = position; if (mAdapter != null) { realPosition = mAdapter.toRealPosition(position); if (positionOffset == 0 && mPreviousOffset == 0 && (position == 0 || position == mAdapter.getCount() - 1)) { setCurrentItem(realPosition, false); } } mPreviousOffset = positionOffset; if (mOuterPageChangeListener != null) { mOuterPageChangeListener.onPageScrolled(realPosition, positionOffset, positionOffsetPixels); } } @Override public void onPageScrollStateChanged(int state) { if (mAdapter != null) { int position = SpinningViewPager.super.getCurrentItem(); int realPosition = mAdapter.toRealPosition(position); if (state == ViewPager.SCROLL_STATE_IDLE && (position == 0 || position == mAdapter.getCount() - 1)) { setCurrentItem(realPosition, false); } } if (mOuterPageChangeListener != null) { mOuterPageChangeListener.onPageScrollStateChanged(state); } } }; }
Java
CREATE TABLE port_group ( id INTEGER CONSTRAINT port_group_id_nn NOT NULL, network_id INTEGER CONSTRAINT port_group_network_id_nn NOT NULL, network_tag INTEGER CONSTRAINT port_group_network_tag_nn NOT NULL, usage VARCHAR2(32) CONSTRAINT port_group_usage_nn NOT NULL, creation_date DATE CONSTRAINT port_group_cr_date_nn NOT NULL, CONSTRAINT port_group_network_uk UNIQUE (network_id), CONSTRAINT port_group_network_fk FOREIGN KEY (network_id) REFERENCES network (id) ON DELETE CASCADE, CONSTRAINT port_group_pk PRIMARY KEY (id) ); CREATE SEQUENCE port_group_seq; DECLARE CURSOR pg_curs IS SELECT ov.network_id, ov.vlan_id, vi.vlan_type, MAX(ov.creation_date) AS creation_date FROM observed_vlan ov JOIN vlan_info vi ON ov.vlan_id = vi.vlan_id GROUP BY ov.network_id, ov.vlan_id, vi.vlan_type; pg_rec pg_curs%ROWTYPE; BEGIN FOR pg_rec IN pg_curs LOOP INSERT INTO port_group (id, network_id, network_tag, usage, creation_date) VALUES (port_group_seq.NEXTVAL, pg_rec.network_id, pg_rec.vlan_id, pg_rec.vlan_type, pg_rec.creation_date); END LOOP; END; / CREATE INDEX port_group_usage_tag_idx ON port_group (usage, network_tag) COMPRESS 1; ALTER TABLE observed_vlan ADD port_group_id INTEGER; UPDATE observed_vlan SET port_group_id = (SELECT id FROM port_group WHERE observed_vlan.network_id = port_group.network_id); ALTER TABLE observed_vlan MODIFY port_group_id INTEGER CONSTRAINT observed_vlan_port_group_id_nn NOT NULL; ALTER TABLE observed_vlan DROP PRIMARY KEY DROP INDEX; ALTER TABLE observed_vlan DROP COLUMN network_id; ALTER TABLE observed_vlan DROP COLUMN vlan_id; ALTER TABLE observed_vlan DROP COLUMN creation_date; ALTER TABLE observed_vlan ADD CONSTRAINT observed_vlan_pk PRIMARY KEY (network_device_id, port_group_id); ALTER TABLE observed_vlan ADD CONSTRAINT obs_vlan_pg_fk FOREIGN KEY (port_group_id) REFERENCES port_group (id) ON DELETE CASCADE; CREATE INDEX observed_vlan_pg_idx ON observed_vlan (port_group_id); ALTER TABLE interface RENAME COLUMN port_group TO port_group_name; ALTER TABLE interface ADD port_group_id INTEGER; ALTER TABLE interface ADD CONSTRAINT iface_pg_fk FOREIGN KEY (port_group_id) REFERENCES port_group (id); ALTER TABLE interface ADD CONSTRAINT iface_pg_ck CHECK (port_group_id IS NULL OR port_group_name IS NULL); DECLARE CURSOR vm_iface_curs IS SELECT interface.id, port_group.id AS pg_id FROM interface JOIN hardware_entity ON interface.hardware_entity_id = hardware_entity.id JOIN model ON hardware_entity.model_id = model.id JOIN virtual_machine ON virtual_machine.machine_id = hardware_entity.id JOIN "resource" ON virtual_machine.resource_id = "resource".id JOIN resholder ON "resource".holder_id = resholder.id JOIN clstr ON resholder.cluster_id = clstr.id JOIN esx_cluster ON esx_cluster.esx_cluster_id = clstr.id JOIN network_device ON esx_cluster.network_device_id = network_device.hardware_entity_id JOIN observed_vlan ON network_device.hardware_entity_id = observed_vlan.network_device_id JOIN port_group ON observed_vlan.port_group_id = port_group.id JOIN vlan_info ON port_group.usage = vlan_info.vlan_type AND port_group.network_tag = vlan_info.vlan_id WHERE (model.model_type = 'virtual_machine' OR model.model_type = 'virtual_appliance') AND vlan_info.port_group = interface.port_group_name FOR UPDATE OF interface.port_group_name, interface.port_group_id; vm_iface_rec vm_iface_curs%ROWTYPE; BEGIN FOR vm_iface_rec IN vm_iface_curs LOOP UPDATE interface SET port_group_name = NULL, port_group_id = vm_iface_rec.pg_id WHERE CURRENT OF vm_iface_curs; END LOOP; END; / COMMIT; QUIT;
Java
/* $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.etch.util.core.io; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import org.apache.etch.util.FlexBuffer; import org.apache.etch.util.core.Who; import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; /** Test UdpConnection. */ public class TestUdpConnection { /** @throws Exception */ @Before @Ignore public void init() throws Exception { aph = new MyPacketHandler(); ac = new UdpConnection( "udp://localhost:4011" ); ac.setSession( aph ); ac.start(); ac.waitUp( 4000 ); System.out.println( "ac up" ); bph = new MyPacketHandler(); bc = new UdpConnection( "udp://localhost:4010" ); bc.setSession( bph ); bc.start(); bc.waitUp( 4000 ); System.out.println( "bc up" ); } /** @throws Exception */ @After @Ignore public void fini() throws Exception { ac.close( false ); bc.close( false ); } private MyPacketHandler aph; private UdpConnection ac; private MyPacketHandler bph; private UdpConnection bc; /** @throws Exception */ @Test @Ignore public void blah() throws Exception { assertEquals( What.UP, aph.what ); assertEquals( What.UP, bph.what ); FlexBuffer buf = new FlexBuffer(); buf.put( 1 ); buf.put( 2 ); buf.put( 3 ); buf.put( 4 ); buf.put( 5 ); buf.setIndex( 0 ); ac.transportPacket( null, buf ); Thread.sleep( 500 ); assertEquals( What.PACKET, bph.what ); assertNotNull( bph.xsender ); assertNotSame( buf, bph.xbuf ); assertEquals( 0, bph.xbuf.index() ); assertEquals( 5, bph.xbuf.length() ); assertEquals( 1, bph.xbuf.get() ); assertEquals( 2, bph.xbuf.get() ); assertEquals( 3, bph.xbuf.get() ); assertEquals( 4, bph.xbuf.get() ); assertEquals( 5, bph.xbuf.get() ); } /** */ public enum What { /** */ UP, /** */ PACKET, /** */ DOWN } /** * receive packets from the udp connection */ public static class MyPacketHandler implements SessionPacket { /** */ public What what; /** */ public Who xsender; /** */ public FlexBuffer xbuf; public void sessionPacket( Who sender, FlexBuffer buf ) throws Exception { assertEquals( What.UP, what ); what = What.PACKET; xsender = sender; xbuf = buf; } public void sessionControl( Object control, Object value ) { // ignore. } public void sessionNotify( Object event ) { if (event.equals( Session.UP )) { assertNull( what ); what = What.UP; return; } if (event.equals( Session.DOWN )) { assertTrue( what == What.UP || what == What.PACKET ); what = What.DOWN; return; } } public Object sessionQuery( Object query ) { // ignore. return null; } } }
Java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.library.sql.generator.implementation.grammar.builders.query; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Objects; import org.apache.polygene.library.sql.generator.grammar.builders.query.OrderByBuilder; import org.apache.polygene.library.sql.generator.grammar.query.OrderByClause; import org.apache.polygene.library.sql.generator.grammar.query.SortSpecification; import org.apache.polygene.library.sql.generator.implementation.grammar.common.SQLBuilderBase; import org.apache.polygene.library.sql.generator.implementation.grammar.query.OrderByClauseImpl; import org.apache.polygene.library.sql.generator.implementation.transformation.spi.SQLProcessorAggregator; /** * @author Stanislav Muhametsin */ public class OrderByBuilderImpl extends SQLBuilderBase implements OrderByBuilder { private final List<SortSpecification> _sortSpecs; public OrderByBuilderImpl( SQLProcessorAggregator processor ) { super( processor ); this._sortSpecs = new ArrayList<SortSpecification>(); } public OrderByBuilder addSortSpecs( SortSpecification... specs ) { for( SortSpecification spec : specs ) { Objects.requireNonNull( spec, "specification" ); } this._sortSpecs.addAll( Arrays.asList( specs ) ); return this; } public List<SortSpecification> getSortSpecs() { return Collections.unmodifiableList( this._sortSpecs ); } public OrderByClause createExpression() { return new OrderByClauseImpl( this.getProcessor(), this._sortSpecs ); } }
Java
// Code generated by protoc-gen-go. DO NOT EDIT. // source: micro/go-plugins/registry/gossip/proto/gossip.proto package gossip import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // Update is the message broadcast type Update struct { // time to live for entry Expires uint64 `protobuf:"varint,1,opt,name=expires,proto3" json:"expires,omitempty"` // type of update Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` // what action is taken Action int32 `protobuf:"varint,3,opt,name=action,proto3" json:"action,omitempty"` // any other associated metadata about the data Metadata map[string]string `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // the payload data; Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Update) Reset() { *m = Update{} } func (m *Update) String() string { return proto.CompactTextString(m) } func (*Update) ProtoMessage() {} func (*Update) Descriptor() ([]byte, []int) { return fileDescriptor_e81db501087fb3b4, []int{0} } func (m *Update) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Update.Unmarshal(m, b) } func (m *Update) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_Update.Marshal(b, m, deterministic) } func (m *Update) XXX_Merge(src proto.Message) { xxx_messageInfo_Update.Merge(m, src) } func (m *Update) XXX_Size() int { return xxx_messageInfo_Update.Size(m) } func (m *Update) XXX_DiscardUnknown() { xxx_messageInfo_Update.DiscardUnknown(m) } var xxx_messageInfo_Update proto.InternalMessageInfo func (m *Update) GetExpires() uint64 { if m != nil { return m.Expires } return 0 } func (m *Update) GetType() int32 { if m != nil { return m.Type } return 0 } func (m *Update) GetAction() int32 { if m != nil { return m.Action } return 0 } func (m *Update) GetMetadata() map[string]string { if m != nil { return m.Metadata } return nil } func (m *Update) GetData() []byte { if m != nil { return m.Data } return nil } func init() { proto.RegisterType((*Update)(nil), "gossip.Update") proto.RegisterMapType((map[string]string)(nil), "gossip.Update.MetadataEntry") } func init() { proto.RegisterFile("micro/go-plugins/registry/gossip/proto/gossip.proto", fileDescriptor_e81db501087fb3b4) } var fileDescriptor_e81db501087fb3b4 = []byte{ // 223 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8f, 0x41, 0x4b, 0x03, 0x31, 0x10, 0x85, 0x49, 0xb7, 0x4d, 0xed, 0xa8, 0x20, 0x83, 0x48, 0x10, 0x0f, 0x8b, 0xa7, 0xbd, 0xb8, 0x01, 0x7b, 0x29, 0x7a, 0xf6, 0xe8, 0x25, 0xe0, 0x0f, 0x88, 0x6d, 0x08, 0xc1, 0x76, 0x13, 0x92, 0xa9, 0x98, 0x9f, 0xea, 0xbf, 0x91, 0x26, 0x51, 0xf0, 0xf6, 0xbe, 0x99, 0x37, 0xbc, 0x37, 0xb0, 0x3e, 0xb8, 0x6d, 0xf4, 0xd2, 0xfa, 0x87, 0xb0, 0x3f, 0x5a, 0x37, 0x25, 0x19, 0x8d, 0x75, 0x89, 0x62, 0x96, 0xd6, 0xa7, 0xe4, 0x82, 0x0c, 0xd1, 0x93, 0x6f, 0x30, 0x16, 0x40, 0x5e, 0xe9, 0xfe, 0x9b, 0x01, 0x7f, 0x0b, 0x3b, 0x4d, 0x06, 0x05, 0x2c, 0xcd, 0x57, 0x70, 0xd1, 0x24, 0xc1, 0x7a, 0x36, 0xcc, 0xd5, 0x2f, 0x22, 0xc2, 0x9c, 0x72, 0x30, 0x62, 0xd6, 0xb3, 0x61, 0xa1, 0x8a, 0xc6, 0x1b, 0xe0, 0x7a, 0x4b, 0xce, 0x4f, 0xa2, 0x2b, 0xd3, 0x46, 0xb8, 0x81, 0xb3, 0x83, 0x21, 0xbd, 0xd3, 0xa4, 0x05, 0xef, 0xbb, 0xe1, 0xfc, 0xf1, 0x6e, 0x6c, 0xc9, 0x35, 0x67, 0x7c, 0x6d, 0xeb, 0x97, 0x89, 0x62, 0x56, 0x7f, 0xee, 0x53, 0x4a, 0xb9, 0x5a, 0xf6, 0x6c, 0xb8, 0x50, 0x45, 0xdf, 0x3e, 0xc3, 0xe5, 0x3f, 0x3b, 0x5e, 0x41, 0xf7, 0x61, 0x72, 0x29, 0xb8, 0x52, 0x27, 0x89, 0xd7, 0xb0, 0xf8, 0xd4, 0xfb, 0x63, 0x6d, 0xb7, 0x52, 0x15, 0x9e, 0x66, 0x1b, 0xf6, 0xce, 0xcb, 0xab, 0xeb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8c, 0xfb, 0xd3, 0xd6, 0x21, 0x01, 0x00, 0x00, }
Java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.apache.geode.management.internal.cli; import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.springframework.shell.core.annotation.CliCommand; import org.springframework.shell.core.annotation.CliOption; import org.springframework.shell.event.ParseResult; import org.apache.geode.management.cli.CliMetaData; import org.apache.geode.management.internal.cli.shell.GfshExecutionStrategy; import org.apache.geode.management.internal.cli.shell.OperationInvoker; /** * Immutable representation of the outcome of parsing a given shell line. * Extends * {@link ParseResult} to add a field to specify the command string that was input by the user. * * <p> * Some commands are required to be executed on a remote GemFire managing member. These should be * marked with the annotation {@link CliMetaData#shellOnly()} set to <code>false</code>. * {@link GfshExecutionStrategy} will detect whether the command is a remote command and send it to * ManagementMBean via {@link OperationInvoker}. * * * @since GemFire 7.0 */ public class GfshParseResult extends ParseResult { private String userInput; private String commandName; private Map<String, String> paramValueStringMap = new HashMap<>(); /** * Creates a GfshParseResult instance to represent parsing outcome. * * @param method Method associated with the command * @param instance Instance on which this method has to be executed * @param arguments arguments of the method * @param userInput user specified commands string */ protected GfshParseResult(final Method method, final Object instance, final Object[] arguments, final String userInput) { super(method, instance, arguments); this.userInput = userInput.trim(); CliCommand cliCommand = method.getAnnotation(CliCommand.class); commandName = cliCommand.value()[0]; Annotation[][] parameterAnnotations = method.getParameterAnnotations(); if (arguments == null) { return; } for (int i = 0; i < arguments.length; i++) { Object argument = arguments[i]; if (argument == null) { continue; } CliOption cliOption = getCliOption(parameterAnnotations, i); String argumentAsString; if (argument instanceof Object[]) { argumentAsString = StringUtils.join((Object[]) argument, ","); } else { argumentAsString = argument.toString(); } // this maps are used for easy access of option values in String form. // It's used in tests and validation of option values in pre-execution paramValueStringMap.put(cliOption.key()[0], argumentAsString); } } /** * @return the userInput */ public String getUserInput() { return userInput; } /** * Used only in tests and command pre-execution for validating arguments */ public String getParamValue(String param) { return paramValueStringMap.get(param); } /** * Used only in tests and command pre-execution for validating arguments * * @return the unmodifiable paramValueStringMap */ public Map<String, String> getParamValueStrings() { return Collections.unmodifiableMap(paramValueStringMap); } public String getCommandName() { return commandName; } private CliOption getCliOption(Annotation[][] parameterAnnotations, int index) { Annotation[] annotations = parameterAnnotations[index]; for (Annotation annotation : annotations) { if (annotation instanceof CliOption) { return (CliOption) annotation; } } return null; } }
Java
/* * Autopsy Forensic Browser * * Copyright 2011-2015 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.sleuthkit.autopsy.corecomponents; import java.awt.Insets; import java.io.File; import java.util.Collection; import java.util.Map; import java.util.TreeMap; import java.util.logging.Level; import javax.swing.BorderFactory; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; import javax.swing.UnsupportedLookAndFeelException; import org.netbeans.spi.sendopts.OptionProcessor; import org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI; import org.openide.modules.ModuleInstall; import org.openide.util.Lookup; import org.openide.windows.WindowManager; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.CaseActionException; import org.sleuthkit.autopsy.casemodule.OpenFromArguments; import org.sleuthkit.autopsy.coreutils.Logger; /** * Manages this module's life cycle. Opens the startup dialog during startup. */ public class Installer extends ModuleInstall { private static Installer instance; private static final Logger logger = Logger.getLogger(Installer.class.getName()); public synchronized static Installer getDefault() { if (instance == null) { instance = new Installer(); } return instance; } private Installer() { super(); } @Override public void restored() { super.restored(); setupLAF(); UIManager.put("ViewTabDisplayerUI", "org.sleuthkit.autopsy.corecomponents.NoTabsTabDisplayerUI"); UIManager.put(DefaultTabbedContainerUI.KEY_VIEW_CONTENT_BORDER, BorderFactory.createEmptyBorder()); UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0)); /* * Open the passed in case, if an aut file was double clicked. */ WindowManager.getDefault().invokeWhenUIReady(() -> { Collection<? extends OptionProcessor> processors = Lookup.getDefault().lookupAll(OptionProcessor.class); for (OptionProcessor processor : processors) { if (processor instanceof OpenFromArguments) { OpenFromArguments argsProcessor = (OpenFromArguments) processor; final String caseFile = argsProcessor.getDefaultArg(); if (caseFile != null && !caseFile.equals("") && caseFile.endsWith(".aut") && new File(caseFile).exists()) { //NON-NLS new Thread(() -> { // Create case. try { Case.open(caseFile); } catch (Exception ex) { logger.log(Level.SEVERE, "Error opening case: ", ex); //NON-NLS } }).start(); return; } } } Case.invokeStartupDialog(); // bring up the startup dialog }); } @Override public void uninstalled() { super.uninstalled(); } @Override public void close() { new Thread(() -> { try { if (Case.isCaseOpen()) { Case.getCurrentCase().closeCase(); } } catch (CaseActionException | IllegalStateException unused) { // Exception already logged. Shutting down, no need to do popup. } }).start(); } private void setupLAF() { //TODO apply custom skinning //UIManager.put("nimbusBase", new Color()); //UIManager.put("nimbusBlueGrey", new Color()); //UIManager.put("control", new Color()); if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS setupMacOsXLAF(); } } /** * Set the look and feel to be the Cross Platform 'Metal', but keep Aqua * dependent elements that set the Menu Bar to be in the correct place on * Mac OS X. */ private void setupMacOsXLAF() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { logger.log(Level.WARNING, "Unable to set theme. ", ex); //NON-NLS } final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI", //NON-NLS }; Map<Object, Object> uiEntries = new TreeMap<>(); // Store the keys that deal with menu items for (String key : UI_MENU_ITEM_KEYS) { uiEntries.put(key, UIManager.get(key)); } //use Metal if available for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { //NON-NLS try { UIManager.setLookAndFeel(info.getClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { logger.log(Level.WARNING, "Unable to set theme. ", ex); //NON-NLS } break; } } // Overwrite the Metal menu item keys to use the Aqua versions uiEntries.entrySet().stream().forEach((entry) -> { UIManager.put(entry.getKey(), entry.getValue()); }); } }
Java
#!/usr/bin/env python # # Copyright 2015-2021 Flavio Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from firenado.util.sqlalchemy_util import Base, base_to_dict from sqlalchemy import Column, String from sqlalchemy.types import Integer, DateTime from sqlalchemy.sql import text import unittest class TestBase(Base): __tablename__ = "test" id = Column("id", Integer, primary_key=True) username = Column("username", String(150), nullable=False) first_name = Column("first_name", String(150), nullable=False) last_name = Column("last_name", String(150), nullable=False) password = Column("password", String(150), nullable=False) email = Column("email", String(150), nullable=False) created = Column("created", DateTime, nullable=False, server_default=text("now()")) modified = Column("modified", DateTime, nullable=False, server_default=text("now()")) class BaseToDictTestCase(unittest.TestCase): def setUp(self): self.test_object = TestBase() self.test_object.id = 1 self.test_object.username = "anusername" self.test_object.password = "apassword" self.test_object.first_name = "Test" self.test_object.last_name = "Object" self.test_object.email = "[email protected]" def test_base_to_dict(self): dict_from_base = base_to_dict(self.test_object) self.assertEqual(dict_from_base['id'], self.test_object.id) self.assertEqual(dict_from_base['username'], self.test_object.username) self.assertEqual(dict_from_base['password'], self.test_object.password) self.assertEqual(dict_from_base['first_name'], self.test_object.first_name) self.assertEqual(dict_from_base['last_name'], self.test_object.last_name) self.assertEqual(dict_from_base['email'], self.test_object.email) self.assertEqual(dict_from_base['created'], self.test_object.created) self.assertEqual(dict_from_base['modified'], self.test_object.modified) def test_base_to_dict(self): dict_from_base = base_to_dict(self.test_object, ["id", "username", "first_name"]) self.assertEqual(dict_from_base['id'], self.test_object.id) self.assertEqual(dict_from_base['username'], self.test_object.username) self.assertEqual(dict_from_base['first_name'], self.test_object.first_name) self.assertTrue("password" not in dict_from_base) self.assertTrue("last_name" not in dict_from_base) self.assertTrue("email" not in dict_from_base) self.assertTrue("created" not in dict_from_base) self.assertTrue("modified" not in dict_from_base)
Java
# 如何在本地运行RTK定位模块 本文档提供了如何在本地运行RTK定位模块的方法。 ## 1. 事先准备 - 从[GitHub网站](https://github.com/ApolloAuto/apollo)下载Apollo源代码 - 按照[教程](../quickstart/apollo_software_installation_guide.md)设置Docker环境 - 从[Apollo数据平台](http://data.apollo.auto/?name=sensor%20data&data_key=multisensor&data_type=1&locale=en-us&lang=en)下载多传感器融合定位demo数据包(仅限美国地区),使用其中*apollo3.5*文件夹下的数据。 ## 2. 编译apollo工程 ### 2.1 启动并进入Apollo开发版Docker容器 ``` bash docker/scripts/dev_start.sh bash docker/scripts/dev_into.sh ``` ### 2.2 编译工程 ``` # (Optional) To make sure you start clean bash apollo.sh clean -a bash apollo.sh build_opt ``` ## 3. 运行RTK模式定位 ``` cyber_launch start /apollo/modules/localization/launch/rtk_localization.launch ``` 在/apollo/data/log目录下,可以看到定位模块输出的相关log文件。 - localization.INFO : INFO级别的log信息 - localization.WARNING : WARNING级别的log信息 - localization.ERROR : ERROR级别的log信息 - localization.out : 标准输出重定向文件 - localizaiton.flags : 启动localization模块使用的配置 ## 4. 播放record文件 在下载好的定位demo数据中,找到一个名为"apollo3.5"的文件夹,假设该文件夹所在路径为DATA_PATH。 ``` cd DATA_PATH/records cyber_recorder play -f record.* ``` ## 6. 可视化定位结果(可选) ### 可视化定位结果 运行可视化工具 ``` cyber_launch start /apollo/modules/localization/launch/msf_visualizer.launch ``` 该可视化工具首先根据定位地图生成用于可视化的缓存文件,存放在/apollo/cyber/data/map_visual目录下。 然后接收以下topic并进行可视化绘制。 - /apollo/sensor/lidar128/compensator/PointCloud2 - /apollo/localization/pose 可视化效果如下 ![1](images/rtk_localization/online_visualizer.png)
Java
package String::CRC32; require Exporter; require DynaLoader; @ISA = qw(Exporter DynaLoader); $VERSION = 1.5; # Items to export into callers namespace by default @EXPORT = qw(crc32); # Other items we are prepared to export if requested @EXPORT_OK = qw(); bootstrap String::CRC32; 1;
Java
/* * Package : org.ludo.codegenerator.core.gen.bean * Source : IStereotype.java */ package org.ludo.codegenerator.core.gen.bean; import java.io.Serializable; import java.util.Date; import java.util.ArrayList; import java.util.List; import org.ludo.codegenerator.core.gen.bean.impl.AttributBean; import org.ludo.codegenerator.core.gen.bean.impl.ClasseBean; import org.ludo.codegenerator.core.gen.bean.abst.IStereotypeAbstract; /** * <b>Description :</b> * IStereotype * */ public interface IStereotype extends IStereotypeAbstract, Serializable { }
Java
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_147-icedtea) on Tue Mar 27 20:06:55 PDT 2012 --> <title>Uses of Class Img</title> <meta name="date" content="2012-03-27"> <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class Img"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../Img.html" title="class in &lt;Unnamed&gt;">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../overview-tree.html">Tree</a></li> <li><a href="../deprecated-list.html">Deprecated</a></li> <li><a href="../index-files/index-1.html">Index</a></li> <li><a href="../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../index.html?class-useImg.html" target="_top">Frames</a></li> <li><a href="Img.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class Img" class="title">Uses of Class<br>Img</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../Img.html" title="class in &lt;Unnamed&gt;">Img</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href>&amp;lt;Unnamed&amp;gt;</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name> <!-- --> </a> <h3>Uses of <a href="../Img.html" title="class in &lt;Unnamed&gt;">Img</a> in <a href="../package-summary.html">&lt;Unnamed&gt;</a></h3> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> <caption><span>Fields in <a href="../package-summary.html">&lt;Unnamed&gt;</a> with type parameters of type <a href="../Img.html" title="class in &lt;Unnamed&gt;">Img</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>private java.util.HashMap&lt;java.lang.Character,<a href="../Img.html" title="class in &lt;Unnamed&gt;">Img</a>&gt;</code></td> <td class="colLast"><span class="strong">ImageSet.</span><code><strong><a href="../ImageSet.html#image_set">image_set</a></strong></code> <div class="block">set of id character to SWT.Image mappings for game map images</div> </td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../package-summary.html">&lt;Unnamed&gt;</a> that return types with arguments of type <a href="../Img.html" title="class in &lt;Unnamed&gt;">Img</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>java.util.HashMap&lt;java.lang.Character,<a href="../Img.html" title="class in &lt;Unnamed&gt;">Img</a>&gt;</code></td> <td class="colLast"><span class="strong">ImageSet.</span><code><strong><a href="../ImageSet.html#getImage_set()">getImage_set</a></strong>()</code>&nbsp;</td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Method parameters in <a href="../package-summary.html">&lt;Unnamed&gt;</a> with type arguments of type <a href="../Img.html" title="class in &lt;Unnamed&gt;">Img</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="strong">ImageSet.</span><code><strong><a href="../ImageSet.html#setImage_set(java.util.HashMap)">setImage_set</a></strong>(java.util.HashMap&lt;java.lang.Character,<a href="../Img.html" title="class in &lt;Unnamed&gt;">Img</a>&gt;&nbsp;image_set)</code>&nbsp;</td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../Img.html" title="class in &lt;Unnamed&gt;">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../overview-tree.html">Tree</a></li> <li><a href="../deprecated-list.html">Deprecated</a></li> <li><a href="../index-files/index-1.html">Index</a></li> <li><a href="../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../index.html?class-useImg.html" target="_top">Frames</a></li> <li><a href="Img.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
Java
/* AngularJS v1.2.10 (c) 2010-2014 Google, Inc. http://angularjs.org License: MIT */ (function(Z,Q,r){'use strict';function F(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.2.10/"+(b?b+"/":"")+a;for(c=1;c<arguments.length;c++)a=a+(1==c?"?":"&")+"p"+(c-1)+"="+encodeURIComponent("function"==typeof arguments[c]?arguments[c].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[c]?"undefined":"string"!=typeof arguments[c]?JSON.stringify(arguments[c]):arguments[c]);return Error(a)}}function rb(b){if(null==b||Aa(b))return!1; var a=b.length;return 1===b.nodeType&&a?!0:D(b)||K(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function q(b,a,c){var d;if(b)if(L(b))for(d in b)"prototype"==d||("length"==d||"name"==d||b.hasOwnProperty&&!b.hasOwnProperty(d))||a.call(c,b[d],d);else if(b.forEach&&b.forEach!==q)b.forEach(a,c);else if(rb(b))for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function Pb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function Pc(b, a,c){for(var d=Pb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function Qb(b){return function(a,c){b(c,a)}}function $a(){for(var b=ka.length,a;b;){b--;a=ka[b].charCodeAt(0);if(57==a)return ka[b]="A",ka.join("");if(90==a)ka[b]="0";else return ka[b]=String.fromCharCode(a+1),ka.join("")}ka.unshift("0");return ka.join("")}function Rb(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function t(b){var a=b.$$hashKey;q(arguments,function(a){a!==b&&q(a,function(a,c){b[c]=a})});Rb(b,a);return b}function S(b){return parseInt(b, 10)}function Sb(b,a){return t(new (t(function(){},{prototype:b})),a)}function w(){}function Ba(b){return b}function $(b){return function(){return b}}function z(b){return"undefined"===typeof b}function B(b){return"undefined"!==typeof b}function X(b){return null!=b&&"object"===typeof b}function D(b){return"string"===typeof b}function sb(b){return"number"===typeof b}function La(b){return"[object Date]"===Ma.call(b)}function K(b){return"[object Array]"===Ma.call(b)}function L(b){return"function"===typeof b} function ab(b){return"[object RegExp]"===Ma.call(b)}function Aa(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function Qc(b){return!(!b||!(b.nodeName||b.on&&b.find))}function Rc(b,a,c){var d=[];q(b,function(b,g,f){d.push(a.call(c,b,g,f))});return d}function bb(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Na(b,a){var c=bb(b,a);0<=c&&b.splice(c,1);return a}function aa(b,a){if(Aa(b)||b&&b.$evalAsync&&b.$watch)throw Oa("cpws");if(a){if(b=== a)throw Oa("cpi");if(K(b))for(var c=a.length=0;c<b.length;c++)a.push(aa(b[c]));else{c=a.$$hashKey;q(a,function(b,c){delete a[c]});for(var d in b)a[d]=aa(b[d]);Rb(a,c)}}else(a=b)&&(K(b)?a=aa(b,[]):La(b)?a=new Date(b.getTime()):ab(b)?a=RegExp(b.source):X(b)&&(a=aa(b,{})));return a}function Tb(b,a){a=a||{};for(var c in b)b.hasOwnProperty(c)&&("$"!==c.charAt(0)&&"$"!==c.charAt(1))&&(a[c]=b[c]);return a}function ua(b,a){if(b===a)return!0;if(null===b||null===a)return!1;if(b!==b&&a!==a)return!0;var c=typeof b, d;if(c==typeof a&&"object"==c)if(K(b)){if(!K(a))return!1;if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ua(b[d],a[d]))return!1;return!0}}else{if(La(b))return La(a)&&b.getTime()==a.getTime();if(ab(b)&&ab(a))return b.toString()==a.toString();if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||Aa(b)||Aa(a)||K(a))return!1;c={};for(d in b)if("$"!==d.charAt(0)&&!L(b[d])){if(!ua(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c.hasOwnProperty(d)&&"$"!==d.charAt(0)&&a[d]!==r&&!L(a[d]))return!1;return!0}return!1} function Ub(){return Q.securityPolicy&&Q.securityPolicy.isActive||Q.querySelector&&!(!Q.querySelector("[ng-csp]")&&!Q.querySelector("[data-ng-csp]"))}function cb(b,a){var c=2<arguments.length?va.call(arguments,2):[];return!L(a)||a instanceof RegExp?a:c.length?function(){return arguments.length?a.apply(b,c.concat(va.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}}function Sc(b,a){var c=a;"string"===typeof b&&"$"===b.charAt(0)?c=r:Aa(a)?c="$WINDOW": a&&Q===a?c="$DOCUMENT":a&&(a.$evalAsync&&a.$watch)&&(c="$SCOPE");return c}function qa(b,a){return"undefined"===typeof b?r:JSON.stringify(b,Sc,a?" ":null)}function Vb(b){return D(b)?JSON.parse(b):b}function Pa(b){"function"===typeof b?b=!0:b&&0!==b.length?(b=x(""+b),b=!("f"==b||"0"==b||"false"==b||"no"==b||"n"==b||"[]"==b)):b=!1;return b}function ga(b){b=A(b).clone();try{b.empty()}catch(a){}var c=A("<div>").append(b).html();try{return 3===b[0].nodeType?x(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/, function(a,b){return"<"+x(b)})}catch(d){return x(c)}}function Wb(b){try{return decodeURIComponent(b)}catch(a){}}function Xb(b){var a={},c,d;q((b||"").split("&"),function(b){b&&(c=b.split("="),d=Wb(c[0]),B(d)&&(b=B(c[1])?Wb(c[1]):!0,a[d]?K(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}function Yb(b){var a=[];q(b,function(b,d){K(b)?q(b,function(b){a.push(wa(d,!0)+(!0===b?"":"="+wa(b,!0)))}):a.push(wa(d,!0)+(!0===b?"":"="+wa(b,!0)))});return a.length?a.join("&"):""}function tb(b){return wa(b, !0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function wa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function Tc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,f=["ng:app","ng-app","x-ng-app","data-ng-app"],h=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;q(f,function(a){f[a]=!0;c(Q.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(q(b.querySelectorAll("."+a),c),q(b.querySelectorAll("."+ a+"\\:"),c),q(b.querySelectorAll("["+a+"]"),c))});q(d,function(a){if(!e){var b=h.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):q(a.attributes,function(b){!e&&f[b.name]&&(e=a,g=b.value)})}});e&&a(e,g?[g]:[])}function Zb(b,a){var c=function(){b=A(b);if(b.injector()){var c=b[0]===Q?"document":ga(b);throw Oa("btstrpd",c);}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");c=$b(a);c.invoke(["$rootScope","$rootElement","$compile","$injector","$animate", function(a,b,c,d,e){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(Z&&!d.test(Z.name))return c();Z.name=Z.name.replace(d,"");Ca.resumeBootstrap=function(b){q(b,function(b){a.push(b)});c()}}function db(b,a){a=a||"_";return b.replace(Uc,function(b,d){return(d?a:"")+b.toLowerCase()})}function ub(b,a,c){if(!b)throw Oa("areq",a||"?",c||"required");return b}function Qa(b,a,c){c&&K(b)&&(b=b[b.length-1]);ub(L(b),a,"not a function, got "+(b&&"object"==typeof b? b.constructor.name||"Object":typeof b));return b}function xa(b,a){if("hasOwnProperty"===b)throw Oa("badname",a);}function vb(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,g=a.length,f=0;f<g;f++)d=a[f],b&&(b=(e=b)[d]);return!c&&L(b)?cb(e,b):b}function wb(b){var a=b[0];b=b[b.length-1];if(a===b)return A(a);var c=[a];do{a=a.nextSibling;if(!a)break;c.push(a)}while(a!==b);return A(c)}function Vc(b){var a=F("$injector"),c=F("ng");b=b.angular||(b.angular={});b.$$minErr=b.$$minErr||F;return b.module|| (b.module=function(){var b={};return function(e,g,f){if("hasOwnProperty"===e)throw c("badname","module");g&&b.hasOwnProperty(e)&&(b[e]=null);return b[e]||(b[e]=function(){function b(a,d,e){return function(){c[e||"push"]([a,d,arguments]);return n}}if(!g)throw a("nomod",e);var c=[],d=[],l=b("$injector","invoke"),n={_invokeQueue:c,_runBlocks:d,requires:g,name:e,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:b("$provide","value"),constant:b("$provide", "constant","unshift"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:l,run:function(a){d.push(a);return this}};f&&l(f);return n}())}}())}function Ra(b){return b.replace(Wc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(Xc,"Moz$1")}function xb(b,a,c,d){function e(b){var e=c&&b?[this.filter(b)]:[this],m=a,k,l,n,p,s,C;if(!d||null!=b)for(;e.length;)for(k=e.shift(), l=0,n=k.length;l<n;l++)for(p=A(k[l]),m?p.triggerHandler("$destroy"):m=!m,s=0,p=(C=p.children()).length;s<p;s++)e.push(Da(C[s]));return g.apply(this,arguments)}var g=Da.fn[b],g=g.$original||g;e.$original=g;Da.fn[b]=e}function O(b){if(b instanceof O)return b;if(!(this instanceof O)){if(D(b)&&"<"!=b.charAt(0))throw yb("nosel");return new O(b)}if(D(b)){var a=Q.createElement("div");a.innerHTML="<div>&#160;</div>"+b;a.removeChild(a.firstChild);zb(this,a.childNodes);A(Q.createDocumentFragment()).append(this)}else zb(this, b)}function Ab(b){return b.cloneNode(!0)}function Ea(b){ac(b);var a=0;for(b=b.childNodes||[];a<b.length;a++)Ea(b[a])}function bc(b,a,c,d){if(B(d))throw yb("offargs");var e=la(b,"events");la(b,"handle")&&(z(a)?q(e,function(a,c){Bb(b,c,a);delete e[c]}):q(a.split(" "),function(a){z(c)?(Bb(b,a,e[a]),delete e[a]):Na(e[a]||[],c)}))}function ac(b,a){var c=b[eb],d=Sa[c];d&&(a?delete Sa[c].data[a]:(d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),bc(b)),delete Sa[c],b[eb]=r))}function la(b,a,c){var d= b[eb],d=Sa[d||-1];if(B(c))d||(b[eb]=d=++Yc,d=Sa[d]={}),d[a]=c;else return d&&d[a]}function cc(b,a,c){var d=la(b,"data"),e=B(c),g=!e&&B(a),f=g&&!X(a);d||f||la(b,"data",d={});if(e)d[a]=c;else if(g){if(f)return d&&d[a];t(d,a)}else return d}function Cb(b,a){return b.getAttribute?-1<(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" "):!1}function Db(b,a){a&&b.setAttribute&&q(a.split(" "),function(a){b.setAttribute("class",ba((" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g, " ").replace(" "+ba(a)+" "," ")))})}function Eb(b,a){if(a&&b.setAttribute){var c=(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");q(a.split(" "),function(a){a=ba(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});b.setAttribute("class",ba(c))}}function zb(b,a){if(a){a=a.nodeName||!B(a.length)||Aa(a)?[a]:a;for(var c=0;c<a.length;c++)b.push(a[c])}}function dc(b,a){return fb(b,"$"+(a||"ngController")+"Controller")}function fb(b,a,c){b=A(b);9==b[0].nodeType&&(b=b.find("html"));for(a=K(a)?a:[a];b.length;){for(var d= 0,e=a.length;d<e;d++)if((c=b.data(a[d]))!==r)return c;b=b.parent()}}function ec(b){for(var a=0,c=b.childNodes;a<c.length;a++)Ea(c[a]);for(;b.firstChild;)b.removeChild(b.firstChild)}function fc(b,a){var c=gb[a.toLowerCase()];return c&&gc[b.nodeName]&&c}function Zc(b,a){var c=function(c,e){c.preventDefault||(c.preventDefault=function(){c.returnValue=!1});c.stopPropagation||(c.stopPropagation=function(){c.cancelBubble=!0});c.target||(c.target=c.srcElement||Q);if(z(c.defaultPrevented)){var g=c.preventDefault; c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented||!1===c.returnValue};var f=Tb(a[e||c.type]||[]);q(f,function(a){a.call(b,c)});8>=M?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function Fa(b){var a=typeof b,c;"object"==a&&null!==b?"function"==typeof(c=b.$$hashKey)?c=b.$$hashKey():c=== r&&(c=b.$$hashKey=$a()):c=b;return a+":"+c}function Ta(b){q(b,this.put,this)}function hc(b){var a,c;"function"==typeof b?(a=b.$inject)||(a=[],b.length&&(c=b.toString().replace($c,""),c=c.match(ad),q(c[1].split(bd),function(b){b.replace(cd,function(b,c,d){a.push(d)})})),b.$inject=a):K(b)?(c=b.length-1,Qa(b[c],"fn"),a=b.slice(0,c)):Qa(b,"fn",!0);return a}function $b(b){function a(a){return function(b,c){if(X(b))q(b,Qb(a));else return a(b,c)}}function c(a,b){xa(a,"service");if(L(b)||K(b))b=n.instantiate(b); if(!b.$get)throw Ua("pget",a);return l[a+h]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[],c,d,g,h;q(a,function(a){if(!k.get(a)){k.put(a,!0);try{if(D(a))for(c=Va(a),b=b.concat(e(c.requires)).concat(c._runBlocks),d=c._invokeQueue,g=0,h=d.length;g<h;g++){var f=d[g],m=n.get(f[0]);m[f[1]].apply(m,f[2])}else L(a)?b.push(n.invoke(a)):K(a)?b.push(n.invoke(a)):Qa(a,"module")}catch(s){throw K(a)&&(a=a[a.length-1]),s.message&&(s.stack&&-1==s.stack.indexOf(s.message))&&(s=s.message+"\n"+s.stack), Ua("modulerr",a,s.stack||s.message||s);}}});return b}function g(a,b){function c(d){if(a.hasOwnProperty(d)){if(a[d]===f)throw Ua("cdep",m.join(" <- "));return a[d]}try{return m.unshift(d),a[d]=f,a[d]=b(d)}catch(e){throw a[d]===f&&delete a[d],e;}finally{m.shift()}}function d(a,b,e){var g=[],h=hc(a),f,k,m;k=0;for(f=h.length;k<f;k++){m=h[k];if("string"!==typeof m)throw Ua("itkn",m);g.push(e&&e.hasOwnProperty(m)?e[m]:c(m))}a.$inject||(a=a[f]);return a.apply(b,g)}return{invoke:d,instantiate:function(a, b){var c=function(){},e;c.prototype=(K(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return X(e)||L(e)?e:c},get:c,annotate:hc,has:function(b){return l.hasOwnProperty(b+h)||a.hasOwnProperty(b)}}}var f={},h="Provider",m=[],k=new Ta,l={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),value:a(function(a,b){return d(a,$(b))}),constant:a(function(a,b){xa(a,"constant");l[a]=b;p[a]=b}),decorator:function(a,b){var c=n.get(a+h), d=c.$get;c.$get=function(){var a=s.invoke(d,c);return s.invoke(b,null,{$delegate:a})}}}},n=l.$injector=g(l,function(){throw Ua("unpr",m.join(" <- "));}),p={},s=p.$injector=g(p,function(a){a=n.get(a+h);return s.invoke(a.$get,a)});q(e(b),function(a){s.invoke(a||w)});return s}function dd(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;q(a,function(a){b||"a"!==x(a.nodeName)||(b=a)});return b}function g(){var b= c.hash(),d;b?(d=f.getElementById(b))?d.scrollIntoView():(d=e(f.getElementsByName(b)))?d.scrollIntoView():"top"===b&&a.scrollTo(0,0):a.scrollTo(0,0)}var f=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(g)});return g}]}function ed(b,a,c,d){function e(a){try{a.apply(null,va.call(arguments,1))}finally{if(C--,0===C)for(;y.length;)try{y.pop()()}catch(b){c.error(b)}}}function g(a,b){(function T(){q(E,function(a){a()});u=b(T,a)})()}function f(){v=null;R!=h.url()&&(R=h.url(),q(ha, function(a){a(h.url())}))}var h=this,m=a[0],k=b.location,l=b.history,n=b.setTimeout,p=b.clearTimeout,s={};h.isMock=!1;var C=0,y=[];h.$$completeOutstandingRequest=e;h.$$incOutstandingRequestCount=function(){C++};h.notifyWhenNoOutstandingRequests=function(a){q(E,function(a){a()});0===C?a():y.push(a)};var E=[],u;h.addPollFn=function(a){z(u)&&g(100,n);E.push(a);return a};var R=k.href,H=a.find("base"),v=null;h.url=function(a,c){k!==b.location&&(k=b.location);l!==b.history&&(l=b.history);if(a){if(R!=a)return R= a,d.history?c?l.replaceState(null,"",a):(l.pushState(null,"",a),H.attr("href",H.attr("href"))):(v=a,c?k.replace(a):k.href=a),h}else return v||k.href.replace(/%27/g,"'")};var ha=[],N=!1;h.onUrlChange=function(a){if(!N){if(d.history)A(b).on("popstate",f);if(d.hashchange)A(b).on("hashchange",f);else h.addPollFn(f);N=!0}ha.push(a);return a};h.baseHref=function(){var a=H.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var V={},J="",ca=h.baseHref();h.cookies=function(a,b){var d,e,g,h;if(a)b=== r?m.cookie=escape(a)+"=;path="+ca+";expires=Thu, 01 Jan 1970 00:00:00 GMT":D(b)&&(d=(m.cookie=escape(a)+"="+escape(b)+";path="+ca).length+1,4096<d&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"));else{if(m.cookie!==J)for(J=m.cookie,d=J.split("; "),V={},g=0;g<d.length;g++)e=d[g],h=e.indexOf("="),0<h&&(a=unescape(e.substring(0,h)),V[a]===r&&(V[a]=unescape(e.substring(h+1))));return V}};h.defer=function(a,b){var c;C++;c=n(function(){delete s[c]; e(a)},b||0);s[c]=!0;return c};h.defer.cancel=function(a){return s[a]?(delete s[a],p(a),e(w),!0):!1}}function fd(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new ed(b,d,a,c)}]}function gd(){this.$get=function(){function b(b,d){function e(a){a!=n&&(p?p==a&&(p=a.n):p=a,g(a.n,a.p),g(a,n),n=a,n.n=null)}function g(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(b in a)throw F("$cacheFactory")("iid",b);var f=0,h=t({},d,{id:b}),m={},k=d&&d.capacity||Number.MAX_VALUE,l={},n=null,p=null; return a[b]={put:function(a,b){var c=l[a]||(l[a]={key:a});e(c);if(!z(b))return a in m||f++,m[a]=b,f>k&&this.remove(p.key),b},get:function(a){var b=l[a];if(b)return e(b),m[a]},remove:function(a){var b=l[a];b&&(b==n&&(n=b.p),b==p&&(p=b.n),g(b.n,b.p),delete l[a],delete m[a],f--)},removeAll:function(){m={};f=0;l={};n=p=null},destroy:function(){l=h=m=null;delete a[b]},info:function(){return t({},h,{size:f})}}}var a={};b.info=function(){var b={};q(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]}; return b}}function hd(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function jc(b,a){var c={},d="Directive",e=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,g=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,f=/^(on[a-z]+|formaction)$/;this.directive=function m(a,e){xa(a,"directive");D(a)?(ub(e,"directiveFactory"),c.hasOwnProperty(a)||(c[a]=[],b.factory(a+d,["$injector","$exceptionHandler",function(b,d){var e=[];q(c[a],function(c,g){try{var f=b.invoke(c);L(f)?f={compile:$(f)}:!f.compile&&f.link&&(f.compile= $(f.link));f.priority=f.priority||0;f.index=g;f.name=f.name||a;f.require=f.require||f.controller&&f.name;f.restrict=f.restrict||"A";e.push(f)}catch(m){d(m)}});return e}])),c[a].push(e)):q(a,Qb(m));return this};this.aHrefSanitizationWhitelist=function(b){return B(b)?(a.aHrefSanitizationWhitelist(b),this):a.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(b){return B(b)?(a.imgSrcSanitizationWhitelist(b),this):a.imgSrcSanitizationWhitelist()};this.$get=["$injector","$interpolate", "$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,b,l,n,p,s,C,y,E,u,R,H){function v(a,b,c,d,e){a instanceof A||(a=A(a));q(a,function(b,c){3==b.nodeType&&b.nodeValue.match(/\S+/)&&(a[c]=A(b).wrap("<span></span>").parent()[0])});var g=N(a,b,a,c,d,e);ha(a,"ng-scope");return function(b,c,d){ub(b,"scope");var e=c?Ga.clone.call(a):a;q(d,function(a,b){e.data("$"+b+"Controller",a)});d=0;for(var f=e.length;d<f;d++){var m= e[d].nodeType;1!==m&&9!==m||e.eq(d).data("$scope",b)}c&&c(e,b);g&&g(b,e,e);return e}}function ha(a,b){try{a.addClass(b)}catch(c){}}function N(a,b,c,d,e,g){function f(a,c,d,e){var g,k,s,l,n,p,I;g=c.length;var C=Array(g);for(n=0;n<g;n++)C[n]=c[n];I=n=0;for(p=m.length;n<p;I++)k=C[I],c=m[n++],g=m[n++],s=A(k),c?(c.scope?(l=a.$new(),s.data("$scope",l)):l=a,(s=c.transclude)||!e&&b?c(g,l,k,d,V(a,s||b)):c(g,l,k,d,e)):g&&g(a,k.childNodes,r,e)}for(var m=[],k,s,l,n,p=0;p<a.length;p++)k=new Fb,s=J(a[p],[],k,0=== p?d:r,e),(g=s.length?ia(s,a[p],k,b,c,null,[],[],g):null)&&g.scope&&ha(A(a[p]),"ng-scope"),k=g&&g.terminal||!(l=a[p].childNodes)||!l.length?null:N(l,g?g.transclude:b),m.push(g,k),n=n||g||k,g=null;return n?f:null}function V(a,b){return function(c,d,e){var g=!1;c||(c=a.$new(),g=c.$$transcluded=!0);d=b(c,d,e);if(g)d.on("$destroy",cb(c,c.$destroy));return d}}function J(a,b,c,d,f){var k=c.$attr,m;switch(a.nodeType){case 1:T(b,ma(Ha(a).toLowerCase()),"E",d,f);var s,l,n;m=a.attributes;for(var p=0,C=m&&m.length;p< C;p++){var y=!1,R=!1;s=m[p];if(!M||8<=M||s.specified){l=s.name;n=ma(l);W.test(n)&&(l=db(n.substr(6),"-"));var v=n.replace(/(Start|End)$/,"");n===v+"Start"&&(y=l,R=l.substr(0,l.length-5)+"end",l=l.substr(0,l.length-6));n=ma(l.toLowerCase());k[n]=l;c[n]=s=ba(s.value);fc(a,n)&&(c[n]=!0);S(a,b,s,n);T(b,n,"A",d,f,y,R)}}a=a.className;if(D(a)&&""!==a)for(;m=g.exec(a);)n=ma(m[2]),T(b,n,"C",d,f)&&(c[n]=ba(m[3])),a=a.substr(m.index+m[0].length);break;case 3:F(b,a.nodeValue);break;case 8:try{if(m=e.exec(a.nodeValue))n= ma(m[1]),T(b,n,"M",d,f)&&(c[n]=ba(m[2]))}catch(E){}}b.sort(z);return b}function ca(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ja("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return A(d)}function P(a,b,c){return function(d,e,g,f,m){e=ca(e[0],b,c);return a(d,e,g,f,m)}}function ia(a,c,d,e,g,f,m,n,p){function y(a,b,c,d){if(a){c&&(a=P(a,c,d));a.require=G.require;if(H===G||G.$$isolateScope)a= kc(a,{isolateScope:!0});m.push(a)}if(b){c&&(b=P(b,c,d));b.require=G.require;if(H===G||G.$$isolateScope)b=kc(b,{isolateScope:!0});n.push(b)}}function R(a,b,c){var d,e="data",g=!1;if(D(a)){for(;"^"==(d=a.charAt(0))||"?"==d;)a=a.substr(1),"^"==d&&(e="inheritedData"),g=g||"?"==d;d=null;c&&"data"===e&&(d=c[a]);d=d||b[e]("$"+a+"Controller");if(!d&&!g)throw ja("ctreq",a,da);}else K(a)&&(d=[],q(a,function(a){d.push(R(a,b,c))}));return d}function E(a,e,g,f,p){function y(a,b){var c;2>arguments.length&&(b=a, a=r);z&&(c=ca);return p(a,b,c)}var I,v,N,u,P,J,ca={},hb;I=c===g?d:Tb(d,new Fb(A(g),d.$attr));v=I.$$element;if(H){var T=/^\s*([@=&])(\??)\s*(\w*)\s*$/;f=A(g);J=e.$new(!0);ia&&ia===H.$$originalDirective?f.data("$isolateScope",J):f.data("$isolateScopeNoTemplate",J);ha(f,"ng-isolate-scope");q(H.scope,function(a,c){var d=a.match(T)||[],g=d[3]||c,f="?"==d[2],d=d[1],m,l,n,p;J.$$isolateBindings[c]=d+g;switch(d){case "@":I.$observe(g,function(a){J[c]=a});I.$$observers[g].$$scope=e;I[g]&&(J[c]=b(I[g])(e)); break;case "=":if(f&&!I[g])break;l=s(I[g]);p=l.literal?ua:function(a,b){return a===b};n=l.assign||function(){m=J[c]=l(e);throw ja("nonassign",I[g],H.name);};m=J[c]=l(e);J.$watch(function(){var a=l(e);p(a,J[c])||(p(a,m)?n(e,a=J[c]):J[c]=a);return m=a},null,l.literal);break;case "&":l=s(I[g]);J[c]=function(a){return l(e,a)};break;default:throw ja("iscp",H.name,c,a);}})}hb=p&&y;V&&q(V,function(a){var b={$scope:a===H||a.$$isolateScope?J:e,$element:v,$attrs:I,$transclude:hb},c;P=a.controller;"@"==P&&(P= I[a.name]);c=C(P,b);ca[a.name]=c;z||v.data("$"+a.name+"Controller",c);a.controllerAs&&(b.$scope[a.controllerAs]=c)});f=0;for(N=m.length;f<N;f++)try{u=m[f],u(u.isolateScope?J:e,v,I,u.require&&R(u.require,v,ca),hb)}catch(G){l(G,ga(v))}f=e;H&&(H.template||null===H.templateUrl)&&(f=J);a&&a(f,g.childNodes,r,p);for(f=n.length-1;0<=f;f--)try{u=n[f],u(u.isolateScope?J:e,v,I,u.require&&R(u.require,v,ca),hb)}catch(B){l(B,ga(v))}}p=p||{};var N=-Number.MAX_VALUE,u,V=p.controllerDirectives,H=p.newIsolateScopeDirective, ia=p.templateDirective;p=p.nonTlbTranscludeDirective;for(var T=!1,z=!1,t=d.$$element=A(c),G,da,U,F=e,O,M=0,na=a.length;M<na;M++){G=a[M];var Wa=G.$$start,S=G.$$end;Wa&&(t=ca(c,Wa,S));U=r;if(N>G.priority)break;if(U=G.scope)u=u||G,G.templateUrl||(x("new/isolated scope",H,G,t),X(U)&&(H=G));da=G.name;!G.templateUrl&&G.controller&&(U=G.controller,V=V||{},x("'"+da+"' controller",V[da],G,t),V[da]=G);if(U=G.transclude)T=!0,G.$$tlb||(x("transclusion",p,G,t),p=G),"element"==U?(z=!0,N=G.priority,U=ca(c,Wa,S), t=d.$$element=A(Q.createComment(" "+da+": "+d[da]+" ")),c=t[0],ib(g,A(va.call(U,0)),c),F=v(U,e,N,f&&f.name,{nonTlbTranscludeDirective:p})):(U=A(Ab(c)).contents(),t.empty(),F=v(U,e));if(G.template)if(x("template",ia,G,t),ia=G,U=L(G.template)?G.template(t,d):G.template,U=Y(U),G.replace){f=G;U=A("<div>"+ba(U)+"</div>").contents();c=U[0];if(1!=U.length||1!==c.nodeType)throw ja("tplrt",da,"");ib(g,t,c);na={$attr:{}};U=J(c,[],na);var W=a.splice(M+1,a.length-(M+1));H&&ic(U);a=a.concat(U).concat(W);B(d,na); na=a.length}else t.html(U);if(G.templateUrl)x("template",ia,G,t),ia=G,G.replace&&(f=G),E=w(a.splice(M,a.length-M),t,d,g,F,m,n,{controllerDirectives:V,newIsolateScopeDirective:H,templateDirective:ia,nonTlbTranscludeDirective:p}),na=a.length;else if(G.compile)try{O=G.compile(t,d,F),L(O)?y(null,O,Wa,S):O&&y(O.pre,O.post,Wa,S)}catch(Z){l(Z,ga(t))}G.terminal&&(E.terminal=!0,N=Math.max(N,G.priority))}E.scope=u&&!0===u.scope;E.transclude=T&&F;return E}function ic(a){for(var b=0,c=a.length;b<c;b++)a[b]=Sb(a[b], {$$isolateScope:!0})}function T(b,e,g,f,k,s,n){if(e===k)return null;k=null;if(c.hasOwnProperty(e)){var p;e=a.get(e+d);for(var C=0,y=e.length;C<y;C++)try{p=e[C],(f===r||f>p.priority)&&-1!=p.restrict.indexOf(g)&&(s&&(p=Sb(p,{$$start:s,$$end:n})),b.push(p),k=p)}catch(v){l(v)}}return k}function B(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;q(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});q(b,function(b,g){"class"==g?(ha(e,b),a["class"]=(a["class"]?a["class"]+ " ":"")+b):"style"==g?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==g.charAt(0)||a.hasOwnProperty(g)||(a[g]=b,d[g]=c[g])})}function w(a,b,c,d,e,g,f,m){var k=[],s,l,C=b[0],y=a.shift(),v=t({},y,{templateUrl:null,transclude:null,replace:null,$$originalDirective:y}),R=L(y.templateUrl)?y.templateUrl(b,c):y.templateUrl;b.empty();n.get(u.getTrustedResourceUrl(R),{cache:p}).success(function(n){var p,E;n=Y(n);if(y.replace){n=A("<div>"+ba(n)+"</div>").contents();p=n[0];if(1!= n.length||1!==p.nodeType)throw ja("tplrt",y.name,R);n={$attr:{}};ib(d,b,p);var u=J(p,[],n);X(y.scope)&&ic(u);a=u.concat(a);B(c,n)}else p=C,b.html(n);a.unshift(v);s=ia(a,p,c,e,b,y,g,f,m);q(d,function(a,c){a==p&&(d[c]=b[0])});for(l=N(b[0].childNodes,e);k.length;){n=k.shift();E=k.shift();var H=k.shift(),ha=k.shift(),u=b[0];E!==C&&(u=Ab(p),ib(H,A(E),u));E=s.transclude?V(n,s.transclude):ha;s(l,n,u,d,E)}k=null}).error(function(a,b,c,d){throw ja("tpload",d.url);});return function(a,b,c,d,e){k?(k.push(b), k.push(c),k.push(d),k.push(e)):s(l,b,c,d,e)}}function z(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function x(a,b,c,d){if(b)throw ja("multidir",b.name,c.name,a,ga(d));}function F(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:$(function(a,b){var c=b.parent(),e=c.data("$binding")||[];e.push(d);ha(c.data("$binding",e),"ng-binding");a.$watch(d,function(a){b[0].nodeValue=a})})})}function O(a,b){if("srcdoc"==b)return u.HTML;var c=Ha(a);if("xlinkHref"== b||"FORM"==c&&"action"==b||"IMG"!=c&&("src"==b||"ngSrc"==b))return u.RESOURCE_URL}function S(a,c,d,e){var g=b(d,!0);if(g){if("multiple"===e&&"SELECT"===Ha(a))throw ja("selmulti",ga(a));c.push({priority:100,compile:function(){return{pre:function(c,d,m){d=m.$$observers||(m.$$observers={});if(f.test(e))throw ja("nodomevents");if(g=b(m[e],!0,O(a,e)))m[e]=g(c),(d[e]||(d[e]=[])).$$inter=!0,(m.$$observers&&m.$$observers[e].$$scope||c).$watch(g,function(a,b){"class"===e&&a!=b?m.$updateClass(a,b):m.$set(e, a)})}}}})}}function ib(a,b,c){var d=b[0],e=b.length,g=d.parentNode,f,m;if(a)for(f=0,m=a.length;f<m;f++)if(a[f]==d){a[f++]=c;m=f+e-1;for(var k=a.length;f<k;f++,m++)m<k?a[f]=a[m]:delete a[f];a.length-=e-1;break}g&&g.replaceChild(c,d);a=Q.createDocumentFragment();a.appendChild(d);c[A.expando]=d[A.expando];d=1;for(e=b.length;d<e;d++)g=b[d],A(g).remove(),a.appendChild(g),delete b[d];b[0]=c;b.length=1}function kc(a,b){return t(function(){return a.apply(null,arguments)},a,b)}var Fb=function(a,b){this.$$element= a;this.$attr=b||{}};Fb.prototype={$normalize:ma,$addClass:function(a){a&&0<a.length&&R.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&R.removeClass(this.$$element,a)},$updateClass:function(a,b){this.$removeClass(lc(b,a));this.$addClass(lc(a,b))},$set:function(a,b,c,d){var e=fc(this.$$element[0],a);e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=db(a,"-"));e=Ha(this.$$element);if("A"===e&&"href"===a||"IMG"===e&&"src"===a)this[a]= b=H(b,"src"===a);!1!==c&&(null===b||b===r?this.$$element.removeAttr(d):this.$$element.attr(d,b));(c=this.$$observers)&&q(c[a],function(a){try{a(b)}catch(c){l(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);y.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var da=b.startSymbol(),na=b.endSymbol(),Y="{{"==da||"}}"==na?Ba:function(a){return a.replace(/\{\{/g,da).replace(/}}/g,na)},W=/^ngAttr[A-Z]/;return v}]}function ma(b){return Ra(b.replace(id, ""))}function lc(b,a){var c="",d=b.split(/\s+/),e=a.split(/\s+/),g=0;a:for(;g<d.length;g++){for(var f=d[g],h=0;h<e.length;h++)if(f==e[h])continue a;c+=(0<c.length?" ":"")+f}return c}function jd(){var b={},a=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(a,d){xa(a,"controller");X(a)?t(b,a):b[a]=d};this.$get=["$injector","$window",function(c,d){return function(e,g){var f,h,m;D(e)&&(f=e.match(a),h=f[1],m=f[3],e=b.hasOwnProperty(h)?b[h]:vb(g.$scope,h,!0)||vb(d,h,!0),Qa(e,h,!0));f=c.instantiate(e,g); if(m){if(!g||"object"!=typeof g.$scope)throw F("$controller")("noscp",h||e.name,m);g.$scope[m]=f}return f}}]}function kd(){this.$get=["$window",function(b){return A(b.document)}]}function ld(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function mc(b){var a={},c,d,e;if(!b)return a;q(b.split("\n"),function(b){e=b.indexOf(":");c=x(ba(b.substr(0,e)));d=ba(b.substr(e+1));c&&(a[c]=a[c]?a[c]+(", "+d):d)});return a}function nc(b){var a=X(b)?b:r;return function(c){a|| (a=mc(b));return c?a[x(c)]||null:a}}function oc(b,a,c){if(L(c))return c(b,a);q(c,function(c){b=c(b,a)});return b}function md(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d={"Content-Type":"application/json;charset=utf-8"},e=this.defaults={transformResponse:[function(d){D(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=Vb(d)));return d}],transformRequest:[function(a){return X(a)&&"[object File]"!==Ma.call(a)?qa(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:aa(d), put:aa(d),patch:aa(d)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},g=this.interceptors=[],f=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,d,n,p){function s(a){function c(a){var b=t({},a,{data:oc(a.data,a.headers,d.transformResponse)});return 200<=a.status&&300>a.status?b:n.reject(b)}var d={transformRequest:e.transformRequest,transformResponse:e.transformResponse},g=function(a){function b(a){var c;q(a,function(b, d){L(b)&&(c=b(),null!=c?a[d]=c:delete a[d])})}var c=e.headers,d=t({},a.headers),g,f,c=t({},c.common,c[x(a.method)]);b(c);b(d);a:for(g in c){a=x(g);for(f in d)if(x(f)===a)continue a;d[g]=c[g]}return d}(a);t(d,a);d.headers=g;d.method=Ia(d.method);(a=Gb(d.url)?b.cookies()[d.xsrfCookieName||e.xsrfCookieName]:r)&&(g[d.xsrfHeaderName||e.xsrfHeaderName]=a);var f=[function(a){g=a.headers;var b=oc(a.data,nc(g),a.transformRequest);z(a.data)&&q(g,function(a,b){"content-type"===x(b)&&delete g[b]});z(a.withCredentials)&& !z(e.withCredentials)&&(a.withCredentials=e.withCredentials);return C(a,b,g).then(c,c)},r],h=n.when(d);for(q(u,function(a){(a.request||a.requestError)&&f.unshift(a.request,a.requestError);(a.response||a.responseError)&&f.push(a.response,a.responseError)});f.length;){a=f.shift();var k=f.shift(),h=h.then(a,k)}h.success=function(a){h.then(function(b){a(b.data,b.status,b.headers,d)});return h};h.error=function(a){h.then(null,function(b){a(b.data,b.status,b.headers,d)});return h};return h}function C(b, c,g){function f(a,b,c){u&&(200<=a&&300>a?u.put(r,[a,b,mc(c)]):u.remove(r));m(b,a,c);d.$$phase||d.$apply()}function m(a,c,d){c=Math.max(c,0);(200<=c&&300>c?p.resolve:p.reject)({data:a,status:c,headers:nc(d),config:b})}function k(){var a=bb(s.pendingRequests,b);-1!==a&&s.pendingRequests.splice(a,1)}var p=n.defer(),C=p.promise,u,q,r=y(b.url,b.params);s.pendingRequests.push(b);C.then(k,k);(b.cache||e.cache)&&(!1!==b.cache&&"GET"==b.method)&&(u=X(b.cache)?b.cache:X(e.cache)?e.cache:E);if(u)if(q=u.get(r), B(q)){if(q.then)return q.then(k,k),q;K(q)?m(q[1],q[0],aa(q[2])):m(q,200,{})}else u.put(r,C);z(q)&&a(b.method,r,c,f,g,b.timeout,b.withCredentials,b.responseType);return C}function y(a,b){if(!b)return a;var c=[];Pc(b,function(a,b){null===a||z(a)||(K(a)||(a=[a]),q(a,function(a){X(a)&&(a=qa(a));c.push(wa(b)+"="+wa(a))}))});return a+(-1==a.indexOf("?")?"?":"&")+c.join("&")}var E=c("$http"),u=[];q(g,function(a){u.unshift(D(a)?p.get(a):p.invoke(a))});q(f,function(a,b){var c=D(a)?p.get(a):p.invoke(a);u.splice(b, 0,{response:function(a){return c(n.when(a))},responseError:function(a){return c(n.reject(a))}})});s.pendingRequests=[];(function(a){q(arguments,function(a){s[a]=function(b,c){return s(t(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){q(arguments,function(a){s[a]=function(b,c,d){return s(t(d||{},{method:a,url:b,data:c}))}})})("post","put");s.defaults=e;return s}]}function nd(b){return 8>=M&&"patch"===x(b)?new ActiveXObject("Microsoft.XMLHTTP"):new Z.XMLHttpRequest}function od(){this.$get= ["$browser","$window","$document",function(b,a,c){return pd(b,nd,b.defer,a.angular.callbacks,c[0])}]}function pd(b,a,c,d,e){function g(a,b){var c=e.createElement("script"),d=function(){c.onreadystatechange=c.onload=c.onerror=null;e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;M&&8>=M?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=function(){d()};e.body.appendChild(c);return d}var f=-1;return function(e,m,k,l,n,p,s,C){function y(){u=f; H&&H();v&&v.abort()}function E(a,d,e,g){r&&c.cancel(r);H=v=null;d=0===d?e?200:404:d;a(1223==d?204:d,e,g);b.$$completeOutstandingRequest(w)}var u;b.$$incOutstandingRequestCount();m=m||b.url();if("jsonp"==x(e)){var R="_"+(d.counter++).toString(36);d[R]=function(a){d[R].data=a};var H=g(m.replace("JSON_CALLBACK","angular.callbacks."+R),function(){d[R].data?E(l,200,d[R].data):E(l,u||-2);d[R]=Ca.noop})}else{var v=a(e);v.open(e,m,!0);q(n,function(a,b){B(a)&&v.setRequestHeader(b,a)});v.onreadystatechange= function(){if(v&&4==v.readyState){var a=null,b=null;u!==f&&(a=v.getAllResponseHeaders(),b="response"in v?v.response:v.responseText);E(l,u||v.status,b,a)}};s&&(v.withCredentials=!0);C&&(v.responseType=C);v.send(k||null)}if(0<p)var r=c(y,p);else p&&p.then&&p.then(y)}}function qd(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function g(g,k,l){for(var n,p,s=0,C=[], y=g.length,E=!1,u=[];s<y;)-1!=(n=g.indexOf(b,s))&&-1!=(p=g.indexOf(a,n+f))?(s!=n&&C.push(g.substring(s,n)),C.push(s=c(E=g.substring(n+f,p))),s.exp=E,s=p+h,E=!0):(s!=y&&C.push(g.substring(s)),s=y);(y=C.length)||(C.push(""),y=1);if(l&&1<C.length)throw pc("noconcat",g);if(!k||E)return u.length=y,s=function(a){try{for(var b=0,c=y,f;b<c;b++)"function"==typeof(f=C[b])&&(f=f(a),f=l?e.getTrusted(l,f):e.valueOf(f),null===f||z(f)?f="":"string"!=typeof f&&(f=qa(f))),u[b]=f;return u.join("")}catch(h){a=pc("interr", g,h.toString()),d(a)}},s.exp=g,s.parts=C,s}var f=b.length,h=a.length;g.startSymbol=function(){return b};g.endSymbol=function(){return a};return g}]}function rd(){this.$get=["$rootScope","$window","$q",function(b,a,c){function d(d,f,h,m){var k=a.setInterval,l=a.clearInterval,n=c.defer(),p=n.promise,s=0,C=B(m)&&!m;h=B(h)?h:0;p.then(null,null,d);p.$$intervalId=k(function(){n.notify(s++);0<h&&s>=h&&(n.resolve(s),l(p.$$intervalId),delete e[p.$$intervalId]);C||b.$apply()},f);e[p.$$intervalId]=n;return p} var e={};d.cancel=function(a){return a&&a.$$intervalId in e?(e[a.$$intervalId].reject("canceled"),clearInterval(a.$$intervalId),delete e[a.$$intervalId],!0):!1};return d}]}function sd(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "), SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function qc(b){b=b.split("/");for(var a=b.length;a--;)b[a]= tb(b[a]);return b.join("/")}function rc(b,a,c){b=ya(b,c);a.$$protocol=b.protocol;a.$$host=b.hostname;a.$$port=S(b.port)||td[b.protocol]||null}function sc(b,a,c){var d="/"!==b.charAt(0);d&&(b="/"+b);b=ya(b,c);a.$$path=decodeURIComponent(d&&"/"===b.pathname.charAt(0)?b.pathname.substring(1):b.pathname);a.$$search=Xb(b.search);a.$$hash=decodeURIComponent(b.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function oa(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function Xa(b){var a= b.indexOf("#");return-1==a?b:b.substr(0,a)}function Hb(b){return b.substr(0,Xa(b).lastIndexOf("/")+1)}function tc(b,a){this.$$html5=!0;a=a||"";var c=Hb(b);rc(b,this,b);this.$$parse=function(a){var e=oa(c,a);if(!D(e))throw Ib("ipthprfx",a,c);sc(e,this,b);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Yb(this.$$search),b=this.$$hash?"#"+tb(this.$$hash):"";this.$$url=qc(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$rewrite=function(d){var e; if((e=oa(b,d))!==r)return d=e,(e=oa(a,e))!==r?c+(oa("/",e)||e):b+d;if((e=oa(c,d))!==r)return c+e;if(c==d+"/")return c}}function Jb(b,a){var c=Hb(b);rc(b,this,b);this.$$parse=function(d){var e=oa(b,d)||oa(c,d),e="#"==e.charAt(0)?oa(a,e):this.$$html5?e:"";if(!D(e))throw Ib("ihshprfx",d,a);sc(e,this,b);d=this.$$path;var g=/^\/?.*?:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));g.exec(e)||(d=(e=g.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Yb(this.$$search),e=this.$$hash? "#"+tb(this.$$hash):"";this.$$url=qc(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$rewrite=function(a){if(Xa(b)==Xa(a))return a}}function uc(b,a){this.$$html5=!0;Jb.apply(this,arguments);var c=Hb(b);this.$$rewrite=function(d){var e;if(b==Xa(d))return d;if(e=oa(c,d))return b+a+e;if(c===d+"/")return c}}function jb(b){return function(){return this[b]}}function vc(b,a){return function(c){if(z(c))return this[b];this[b]=a(c);this.$$compose();return this}}function ud(){var b= "",a=!1;this.hashPrefix=function(a){return B(a)?(b=a,this):b};this.html5Mode=function(b){return B(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function f(a){c.$broadcast("$locationChangeSuccess",h.absUrl(),a)}var h,m=d.baseHref(),k=d.url();a?(m=k.substring(0,k.indexOf("/",k.indexOf("//")+2))+(m||"/"),e=e.history?tc:uc):(m=Xa(k),e=Jb);h=new e(m,"#"+b);h.$$parse(h.$$rewrite(k));g.on("click",function(a){if(!a.ctrlKey&&!a.metaKey&&2!=a.which){for(var b= A(a.target);"a"!==x(b[0].nodeName);)if(b[0]===g[0]||!(b=b.parent())[0])return;var e=b.prop("href");X(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ya(e.animVal).href);var f=h.$$rewrite(e);e&&(!b.attr("target")&&f&&!a.isDefaultPrevented())&&(a.preventDefault(),f!=d.url()&&(h.$$parse(f),c.$apply(),Z.angular["ff-684208-preventDefault"]=!0))}});h.absUrl()!=k&&d.url(h.absUrl(),!0);d.onUrlChange(function(a){h.absUrl()!=a&&(c.$evalAsync(function(){var b=h.absUrl();h.$$parse(a);c.$broadcast("$locationChangeStart", a,b).defaultPrevented?(h.$$parse(b),d.url(b)):f(b)}),c.$$phase||c.$digest())});var l=0;c.$watch(function(){var a=d.url(),b=h.$$replace;l&&a==h.absUrl()||(l++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",h.absUrl(),a).defaultPrevented?h.$$parse(a):(d.url(h.absUrl(),b),f(a))}));h.$$replace=!1;return l});return h}]}function vd(){var b=!0,a=this;this.debugEnabled=function(a){return B(a)?(b=a,this):b};this.$get=["$window",function(c){function d(a){a instanceof Error&&(a.stack?a=a.message&& -1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=c.console||{},e=b[a]||b.log||w;a=!1;try{a=!!e.apply}catch(m){}return a?function(){var a=[];q(arguments,function(b){a.push(d(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){b&&c.apply(a,arguments)}}()}}]}function ea(b, a){if("constructor"===b)throw za("isecfld",a);return b}function Ya(b,a){if(b){if(b.constructor===b)throw za("isecfn",a);if(b.document&&b.location&&b.alert&&b.setInterval)throw za("isecwindow",a);if(b.children&&(b.nodeName||b.on&&b.find))throw za("isecdom",a);}return b}function kb(b,a,c,d,e){e=e||{};a=a.split(".");for(var g,f=0;1<a.length;f++){g=ea(a.shift(),d);var h=b[g];h||(h={},b[g]=h);b=h;b.then&&e.unwrapPromises&&(ra(d),"$$v"in b||function(a){a.then(function(b){a.$$v=b})}(b),b.$$v===r&&(b.$$v= {}),b=b.$$v)}g=ea(a.shift(),d);return b[g]=c}function wc(b,a,c,d,e,g,f){ea(b,g);ea(a,g);ea(c,g);ea(d,g);ea(e,g);return f.unwrapPromises?function(f,m){var k=m&&m.hasOwnProperty(b)?m:f,l;if(null==k)return k;(k=k[b])&&k.then&&(ra(g),"$$v"in k||(l=k,l.$$v=r,l.then(function(a){l.$$v=a})),k=k.$$v);if(!a)return k;if(null==k)return r;(k=k[a])&&k.then&&(ra(g),"$$v"in k||(l=k,l.$$v=r,l.then(function(a){l.$$v=a})),k=k.$$v);if(!c)return k;if(null==k)return r;(k=k[c])&&k.then&&(ra(g),"$$v"in k||(l=k,l.$$v=r,l.then(function(a){l.$$v= a})),k=k.$$v);if(!d)return k;if(null==k)return r;(k=k[d])&&k.then&&(ra(g),"$$v"in k||(l=k,l.$$v=r,l.then(function(a){l.$$v=a})),k=k.$$v);if(!e)return k;if(null==k)return r;(k=k[e])&&k.then&&(ra(g),"$$v"in k||(l=k,l.$$v=r,l.then(function(a){l.$$v=a})),k=k.$$v);return k}:function(g,f){var k=f&&f.hasOwnProperty(b)?f:g;if(null==k)return k;k=k[b];if(!a)return k;if(null==k)return r;k=k[a];if(!c)return k;if(null==k)return r;k=k[c];if(!d)return k;if(null==k)return r;k=k[d];return e?null==k?r:k=k[e]:k}}function wd(b, a){ea(b,a);return function(a,d){return null==a?r:(d&&d.hasOwnProperty(b)?d:a)[b]}}function xd(b,a,c){ea(b,c);ea(a,c);return function(c,e){if(null==c)return r;c=(e&&e.hasOwnProperty(b)?e:c)[b];return null==c?r:c[a]}}function xc(b,a,c){if(Kb.hasOwnProperty(b))return Kb[b];var d=b.split("."),e=d.length,g;if(a.unwrapPromises||1!==e)if(a.unwrapPromises||2!==e)if(a.csp)g=6>e?wc(d[0],d[1],d[2],d[3],d[4],c,a):function(b,g){var f=0,h;do h=wc(d[f++],d[f++],d[f++],d[f++],d[f++],c,a)(b,g),g=r,b=h;while(f<e); return h};else{var f="var p;\n";q(d,function(b,d){ea(b,c);f+="if(s == null) return undefined;\ns="+(d?"s":'((k&&k.hasOwnProperty("'+b+'"))?k:s)')+'["'+b+'"];\n'+(a.unwrapPromises?'if (s && s.then) {\n pw("'+c.replace(/(["\r\n])/g,"\\$1")+'");\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n':"")});var f=f+"return s;",h=new Function("s","k","pw",f);h.toString=$(f);g=a.unwrapPromises?function(a,b){return h(a,b,ra)}:h}else g=xd(d[0],d[1],c);else g= wd(d[0],c);"hasOwnProperty"!==b&&(Kb[b]=g);return g}function yd(){var b={},a={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=function(b){return B(b)?(a.unwrapPromises=!!b,this):a.unwrapPromises};this.logPromiseWarnings=function(b){return B(b)?(a.logPromiseWarnings=b,this):a.logPromiseWarnings};this.$get=["$filter","$sniffer","$log",function(c,d,e){a.csp=d.csp;ra=function(b){a.logPromiseWarnings&&!yc.hasOwnProperty(b)&&(yc[b]=!0,e.warn("[$parse] Promise found in the expression `"+ b+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))};return function(d){var e;switch(typeof d){case "string":if(b.hasOwnProperty(d))return b[d];e=new Lb(a);e=(new Za(e,c,a)).parse(d,!1);"hasOwnProperty"!==d&&(b[d]=e);return e;case "function":return d;default:return w}}}]}function zd(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return Ad(function(a){b.$evalAsync(a)},a)}]}function Ad(b,a){function c(a){return a}function d(a){return f(a)}var e=function(){var h= [],m,k;return k={resolve:function(a){if(h){var c=h;h=r;m=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],m.then(a[0],a[1],a[2])})}},reject:function(a){k.resolve(f(a))},notify:function(a){if(h){var c=h;h.length&&b(function(){for(var b,d=0,e=c.length;d<e;d++)b=c[d],b[2](a)})}},promise:{then:function(b,g,f){var k=e(),C=function(d){try{k.resolve((L(b)?b:c)(d))}catch(e){k.reject(e),a(e)}},y=function(b){try{k.resolve((L(g)?g:d)(b))}catch(c){k.reject(c),a(c)}},E=function(b){try{k.notify((L(f)? f:c)(b))}catch(d){a(d)}};h?h.push([C,y,E]):m.then(C,y,E);return k.promise},"catch":function(a){return this.then(null,a)},"finally":function(a){function b(a,c){var d=e();c?d.resolve(a):d.reject(a);return d.promise}function d(e,g){var f=null;try{f=(a||c)()}catch(h){return b(h,!1)}return f&&L(f.then)?f.then(function(){return b(e,g)},function(a){return b(a,!1)}):b(e,g)}return this.then(function(a){return d(a,!0)},function(a){return d(a,!1)})}}}},g=function(a){return a&&L(a.then)?a:{then:function(c){var d= e();b(function(){d.resolve(c(a))});return d.promise}}},f=function(c){return{then:function(g,f){var l=e();b(function(){try{l.resolve((L(f)?f:d)(c))}catch(b){l.reject(b),a(b)}});return l.promise}}};return{defer:e,reject:f,when:function(h,m,k,l){var n=e(),p,s=function(b){try{return(L(m)?m:c)(b)}catch(d){return a(d),f(d)}},C=function(b){try{return(L(k)?k:d)(b)}catch(c){return a(c),f(c)}},y=function(b){try{return(L(l)?l:c)(b)}catch(d){a(d)}};b(function(){g(h).then(function(a){p||(p=!0,n.resolve(g(a).then(s, C,y)))},function(a){p||(p=!0,n.resolve(C(a)))},function(a){p||n.notify(y(a))})});return n.promise},all:function(a){var b=e(),c=0,d=K(a)?[]:{};q(a,function(a,e){c++;g(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise}}}function Bd(){var b=10,a=F("$rootScope"),c=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(d, e,g,f){function h(){this.$id=$a();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$postDigestQueue=[];this.$$listeners={};this.$$listenerCount={};this.$$isolateBindings={}}function m(b){if(p.$$phase)throw a("inprog",p.$$phase);p.$$phase=b}function k(a,b){var c=g(a);Qa(c,b);return c}function l(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&& delete a.$$listenerCount[c];while(a=a.$parent)}function n(){}h.prototype={constructor:h,$new:function(a){a?(a=new h,a.$root=this.$root,a.$$asyncQueue=this.$$asyncQueue,a.$$postDigestQueue=this.$$postDigestQueue):(a=function(){},a.prototype=this,a=new a,a.$id=$a());a["this"]=a;a.$$listeners={};a.$$listenerCount={};a.$parent=this;a.$$watchers=a.$$nextSibling=a.$$childHead=a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead= this.$$childTail=a;return a},$watch:function(a,b,d){var e=k(a,"watch"),g=this.$$watchers,f={fn:b,last:n,get:e,exp:a,eq:!!d};c=null;if(!L(b)){var h=k(b||w,"listener");f.fn=function(a,b,c){h(c)}}if("string"==typeof a&&e.constant){var m=f.fn;f.fn=function(a,b,c){m.call(this,a,b,c);Na(g,f)}}g||(g=this.$$watchers=[]);g.unshift(f);return function(){Na(g,f);c=null}},$watchCollection:function(a,b){var c=this,d,e,f=0,h=g(a),m=[],k={},l=0;return this.$watch(function(){e=h(c);var a,b;if(X(e))if(rb(e))for(d!== m&&(d=m,l=d.length=0,f++),a=e.length,l!==a&&(f++,d.length=l=a),b=0;b<a;b++)d[b]!==e[b]&&(f++,d[b]=e[b]);else{d!==k&&(d=k={},l=0,f++);a=0;for(b in e)e.hasOwnProperty(b)&&(a++,d.hasOwnProperty(b)?d[b]!==e[b]&&(f++,d[b]=e[b]):(l++,d[b]=e[b],f++));if(l>a)for(b in f++,d)d.hasOwnProperty(b)&&!e.hasOwnProperty(b)&&(l--,delete d[b])}else d!==e&&(d=e,f++);return f},function(){b(e,d,c)})},$digest:function(){var d,f,g,h,k=this.$$asyncQueue,l=this.$$postDigestQueue,q,v,r=b,N,V=[],J,A,P;m("$digest");c=null;do{v= !1;for(N=this;k.length;){try{P=k.shift(),P.scope.$eval(P.expression)}catch(B){p.$$phase=null,e(B)}c=null}a:do{if(h=N.$$watchers)for(q=h.length;q--;)try{if(d=h[q])if((f=d.get(N))!==(g=d.last)&&!(d.eq?ua(f,g):"number"==typeof f&&"number"==typeof g&&isNaN(f)&&isNaN(g)))v=!0,c=d,d.last=d.eq?aa(f):f,d.fn(f,g===n?f:g,N),5>r&&(J=4-r,V[J]||(V[J]=[]),A=L(d.exp)?"fn: "+(d.exp.name||d.exp.toString()):d.exp,A+="; newVal: "+qa(f)+"; oldVal: "+qa(g),V[J].push(A));else if(d===c){v=!1;break a}}catch(t){p.$$phase= null,e(t)}if(!(h=N.$$childHead||N!==this&&N.$$nextSibling))for(;N!==this&&!(h=N.$$nextSibling);)N=N.$parent}while(N=h);if((v||k.length)&&!r--)throw p.$$phase=null,a("infdig",b,qa(V));}while(v||k.length);for(p.$$phase=null;l.length;)try{l.shift()()}catch(z){e(z)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this!==p&&(q(this.$$listenerCount,cb(null,l,this)),a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a.$$childTail==this&& (a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a){p.$$phase||p.$$asyncQueue.length||f.defer(function(){p.$$asyncQueue.length&&p.$digest()});this.$$asyncQueue.push({scope:this,expression:a})},$$postDigest:function(a){this.$$postDigestQueue.push(a)}, $apply:function(a){try{return m("$apply"),this.$eval(a)}catch(b){e(b)}finally{p.$$phase=null;try{p.$digest()}catch(c){throw e(c),c;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){c[bb(c,b)]=null;l(e,1,a)}},$emit:function(a,b){var c=[],d,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented= !0},defaultPrevented:!1},m=[h].concat(va.call(arguments,1)),k,l;do{d=f.$$listeners[a]||c;h.currentScope=f;k=0;for(l=d.length;k<l;k++)if(d[k])try{d[k].apply(null,m)}catch(p){e(p)}else d.splice(k,1),k--,l--;if(g)break;f=f.$parent}while(f);return h},$broadcast:function(a,b){for(var c=this,d=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1},g=[f].concat(va.call(arguments,1)),h,k;c=d;){f.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null, g)}catch(m){e(m)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}return f}};var p=new h;return p}]}function Cd(){var b=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*(https?|ftp|file):|data:image\//;this.aHrefSanitizationWhitelist=function(a){return B(a)?(b=a,this):b};this.imgSrcSanitizationWhitelist=function(b){return B(b)?(a=b,this):a};this.$get=function(){return function(c,d){var e=d?a:b,g;if(!M||8<= M)if(g=ya(c).href,""!==g&&!g.match(e))return"unsafe:"+g;return c}}}function Dd(b){if("self"===b)return b;if(D(b)){if(-1<b.indexOf("***"))throw sa("iwcard",b);b=b.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08").replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return RegExp("^"+b+"$")}if(ab(b))return RegExp("^"+b.source+"$");throw sa("imatcher");}function zc(b){var a=[];B(b)&&q(b,function(b){a.push(Dd(b))});return a}function Ed(){this.SCE_CONTEXTS=fa;var b=["self"],a=[];this.resourceUrlWhitelist= function(a){arguments.length&&(b=zc(a));return b};this.resourceUrlBlacklist=function(b){arguments.length&&(a=zc(b));return a};this.$get=["$injector",function(c){function d(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var e=function(a){throw sa("unsafe");};c.has("$sanitize")&&(e=c.get("$sanitize")); var g=d(),f={};f[fa.HTML]=d(g);f[fa.CSS]=d(g);f[fa.URL]=d(g);f[fa.JS]=d(g);f[fa.RESOURCE_URL]=d(f[fa.URL]);return{trustAs:function(a,b){var c=f.hasOwnProperty(a)?f[a]:null;if(!c)throw sa("icontext",a,b);if(null===b||b===r||""===b)return b;if("string"!==typeof b)throw sa("itype",a);return new c(b)},getTrusted:function(c,d){if(null===d||d===r||""===d)return d;var g=f.hasOwnProperty(c)?f[c]:null;if(g&&d instanceof g)return d.$$unwrapTrustedValue();if(c===fa.RESOURCE_URL){var g=ya(d.toString()),l,n,p= !1;l=0;for(n=b.length;l<n;l++)if("self"===b[l]?Gb(g):b[l].exec(g.href)){p=!0;break}if(p)for(l=0,n=a.length;l<n;l++)if("self"===a[l]?Gb(g):a[l].exec(g.href)){p=!1;break}if(p)return d;throw sa("insecurl",d.toString());}if(c===fa.HTML)return e(d);throw sa("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}function Fd(){var b=!0;this.enabled=function(a){arguments.length&&(b=!!a);return b};this.$get=["$parse","$sniffer","$sceDelegate",function(a,c,d){if(b&&c.msie&&8>c.msieDocumentMode)throw sa("iequirks"); var e=aa(fa);e.isEnabled=function(){return b};e.trustAs=d.trustAs;e.getTrusted=d.getTrusted;e.valueOf=d.valueOf;b||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=Ba);e.parseAs=function(b,c){var d=a(c);return d.literal&&d.constant?d:function(a,c){return e.getTrusted(b,d(a,c))}};var g=e.parseAs,f=e.getTrusted,h=e.trustAs;q(fa,function(a,b){var c=x(b);e[Ra("parse_as_"+c)]=function(b){return g(a,b)};e[Ra("get_trusted_"+c)]=function(b){return f(a,b)};e[Ra("trust_as_"+c)]=function(b){return h(a, b)}});return e}]}function Gd(){this.$get=["$window","$document",function(b,a){var c={},d=S((/android (\d+)/.exec(x((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),g=a[0]||{},f=g.documentMode,h,m=/^(Moz|webkit|O|ms)(?=[A-Z])/,k=g.body&&g.body.style,l=!1,n=!1;if(k){for(var p in k)if(l=m.exec(p)){h=l[0];h=h.substr(0,1).toUpperCase()+h.substr(1);break}h||(h="WebkitOpacity"in k&&"webkit");l=!!("transition"in k||h+"Transition"in k);n=!!("animation"in k||h+"Animation"in k);!d||l&&n||(l=D(g.body.style.webkitTransition),n=D(g.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hashchange:"onhashchange"in b&&(!f||7<f),hasEvent:function(a){if("input"==a&&9==M)return!1;if(z(c[a])){var b=g.createElement("div");c[a]="on"+a in b}return c[a]},csp:Ub(),vendorPrefix:h,transitions:l,animations:n,android:d,msie:M,msieDocumentMode:f}}]}function Hd(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,h, m){var k=c.defer(),l=k.promise,n=B(m)&&!m;h=a.defer(function(){try{k.resolve(e())}catch(a){k.reject(a),d(a)}finally{delete g[l.$$timeoutId]}n||b.$apply()},h);l.$$timeoutId=h;g[h]=k;return l}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),delete g[b.$$timeoutId],a.defer.cancel(b.$$timeoutId)):!1};return e}]}function ya(b,a){var c=b;M&&(Y.setAttribute("href",c),c=Y.href);Y.setAttribute("href",c);return{href:Y.href,protocol:Y.protocol?Y.protocol.replace(/:$/, ""):"",host:Y.host,search:Y.search?Y.search.replace(/^\?/,""):"",hash:Y.hash?Y.hash.replace(/^#/,""):"",hostname:Y.hostname,port:Y.port,pathname:"/"===Y.pathname.charAt(0)?Y.pathname:"/"+Y.pathname}}function Gb(b){b=D(b)?ya(b):b;return b.protocol===Ac.protocol&&b.host===Ac.host}function Id(){this.$get=$(Z)}function Bc(b){function a(d,e){if(X(d)){var g={};q(d,function(b,c){g[c]=a(c,b)});return g}return b.factory(d+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+ c)}}];a("currency",Cc);a("date",Dc);a("filter",Jd);a("json",Kd);a("limitTo",Ld);a("lowercase",Md);a("number",Ec);a("orderBy",Fc);a("uppercase",Nd)}function Jd(){return function(b,a,c){if(!K(b))return b;var d=typeof c,e=[];e.check=function(a){for(var b=0;b<e.length;b++)if(!e[b](a))return!1;return!0};"function"!==d&&(c="boolean"===d&&c?function(a,b){return Ca.equals(a,b)}:function(a,b){b=(""+b).toLowerCase();return-1<(""+a).toLowerCase().indexOf(b)});var g=function(a,b){if("string"==typeof b&&"!"=== b.charAt(0))return!g(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return c(a,b);case "object":switch(typeof b){case "object":return c(a,b);default:for(var d in a)if("$"!==d.charAt(0)&&g(a[d],b))return!0}return!1;case "array":for(d=0;d<a.length;d++)if(g(a[d],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a={$:a};case "object":for(var f in a)(function(b){"undefined"!=typeof a[b]&&e.push(function(c){return g("$"==b?c: vb(c,b),a[b])})})(f);break;case "function":e.push(a);break;default:return b}d=[];for(f=0;f<b.length;f++){var h=b[f];e.check(h)&&d.push(h)}return d}}function Cc(b){var a=b.NUMBER_FORMATS;return function(b,d){z(d)&&(d=a.CURRENCY_SYM);return Gc(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,d)}}function Ec(b){var a=b.NUMBER_FORMATS;return function(b,d){return Gc(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Gc(b,a,c,d,e){if(isNaN(b)||!isFinite(b))return"";var g=0>b;b=Math.abs(b); var f=b+"",h="",m=[],k=!1;if(-1!==f.indexOf("e")){var l=f.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&l[3]>e+1?f="0":(h=f,k=!0)}if(k)0<e&&(-1<b&&1>b)&&(h=b.toFixed(e));else{f=(f.split(Hc)[1]||"").length;z(e)&&(e=Math.min(Math.max(a.minFrac,f),a.maxFrac));f=Math.pow(10,e);b=Math.round(b*f)/f;b=(""+b).split(Hc);f=b[0];b=b[1]||"";var l=0,n=a.lgSize,p=a.gSize;if(f.length>=n+p)for(l=f.length-n,k=0;k<l;k++)0===(l-k)%p&&0!==k&&(h+=c),h+=f.charAt(k);for(k=l;k<f.length;k++)0===(f.length-k)%n&&0!==k&&(h+=c), h+=f.charAt(k);for(;b.length<e;)b+="0";e&&"0"!==e&&(h+=d+b.substr(0,e))}m.push(g?a.negPre:a.posPre);m.push(h);m.push(g?a.negSuf:a.posSuf);return m.join("")}function Mb(b,a,c){var d="";0>b&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function W(b,a,c,d){c=c||0;return function(e){e=e["get"+b]();if(0<c||e>-c)e+=c;0===e&&-12==c&&(e=12);return Mb(e,a,d)}}function lb(b,a){return function(c,d){var e=c["get"+b](),g=Ia(a?"SHORT"+b:b);return d[g][e]}}function Dc(b){function a(a){var b; if(b=a.match(c)){a=new Date(0);var g=0,f=0,h=b[8]?a.setUTCFullYear:a.setFullYear,m=b[8]?a.setUTCHours:a.setHours;b[9]&&(g=S(b[9]+b[10]),f=S(b[9]+b[11]));h.call(a,S(b[1]),S(b[2])-1,S(b[3]));g=S(b[4]||0)-g;f=S(b[5]||0)-f;h=S(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));m.call(a,g,f,h,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var g="",f=[],h,m;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;D(c)&& (c=Od.test(c)?S(c):a(c));sb(c)&&(c=new Date(c));if(!La(c))return c;for(;e;)(m=Pd.exec(e))?(f=f.concat(va.call(m,1)),e=f.pop()):(f.push(e),e=null);q(f,function(a){h=Qd[a];g+=h?h(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Kd(){return function(b){return qa(b,!0)}}function Ld(){return function(b,a){if(!K(b)&&!D(b))return b;a=S(a);if(D(b))return a?0<=a?b.slice(0,a):b.slice(a,b.length):"";var c=[],d,e;a>b.length?a=b.length:a<-b.length&&(a=-b.length);0<a?(d=0, e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Fc(b){return function(a,c,d){function e(a,b){return Pa(b)?function(b,c){return a(c,b)}:a}if(!K(a)||!c)return a;c=K(c)?c:[c];c=Rc(c,function(a){var c=!1,d=a||Ba;if(D(a)){if("+"==a.charAt(0)||"-"==a.charAt(0))c="-"==a.charAt(0),a=a.substring(1);d=b(a)}return e(function(a,b){var c;c=d(a);var e=d(b),g=typeof c,f=typeof e;g==f?("string"==g&&(c=c.toLowerCase(),e=e.toLowerCase()),c=c===e?0:c<e?-1:1):c=g<f?-1:1;return c},c)});for(var g= [],f=0;f<a.length;f++)g.push(a[f]);return g.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(0!==e)return e}return 0},d))}}function ta(b){L(b)&&(b={link:b});b.restrict=b.restrict||"AC";return $(b)}function Ic(b,a){function c(a,c){c=c?"-"+db(c,"-"):"";b.removeClass((a?mb:nb)+c).addClass((a?nb:mb)+c)}var d=this,e=b.parent().controller("form")||ob,g=0,f=d.$error={},h=[];d.$name=a.name||a.ngForm;d.$dirty=!1;d.$pristine=!0;d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(Ja);c(!0); d.$addControl=function(a){xa(a.$name,"input");h.push(a);a.$name&&(d[a.$name]=a)};d.$removeControl=function(a){a.$name&&d[a.$name]===a&&delete d[a.$name];q(f,function(b,c){d.$setValidity(c,!0,a)});Na(h,a)};d.$setValidity=function(a,b,h){var n=f[a];if(b)n&&(Na(n,h),n.length||(g--,g||(c(b),d.$valid=!0,d.$invalid=!1),f[a]=!1,c(!0,a),e.$setValidity(a,!0,d)));else{g||c(b);if(n){if(-1!=bb(n,h))return}else f[a]=n=[],g++,c(!1,a),e.$setValidity(a,!1,d);n.push(h);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Ja).addClass(pb); d.$dirty=!0;d.$pristine=!1;e.$setDirty()};d.$setPristine=function(){b.removeClass(pb).addClass(Ja);d.$dirty=!1;d.$pristine=!0;q(h,function(a){a.$setPristine()})}}function pa(b,a,c,d){b.$setValidity(a,c);return c?d:r}function qb(b,a,c,d,e,g){if(!e.android){var f=!1;a.on("compositionstart",function(a){f=!0});a.on("compositionend",function(){f=!1})}var h=function(){if(!f){var e=a.val();Pa(c.ngTrim||"T")&&(e=ba(e));d.$viewValue!==e&&(b.$$phase?d.$setViewValue(e):b.$apply(function(){d.$setViewValue(e)}))}}; if(e.hasEvent("input"))a.on("input",h);else{var m,k=function(){m||(m=g.defer(function(){h();m=null}))};a.on("keydown",function(a){a=a.keyCode;91===a||(15<a&&19>a||37<=a&&40>=a)||k()});if(e.hasEvent("paste"))a.on("paste cut",k)}a.on("change",h);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)};var l=c.ngPattern;l&&((e=l.match(/^\/(.*)\/([gim]*)$/))?(l=RegExp(e[1],e[2]),e=function(a){return pa(d,"pattern",d.$isEmpty(a)||l.test(a),a)}):e=function(c){var e=b.$eval(l);if(!e||!e.test)throw F("ngPattern")("noregexp", l,e,ga(a));return pa(d,"pattern",d.$isEmpty(c)||e.test(c),c)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var n=S(c.ngMinlength);e=function(a){return pa(d,"minlength",d.$isEmpty(a)||a.length>=n,a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var p=S(c.ngMaxlength);e=function(a){return pa(d,"maxlength",d.$isEmpty(a)||a.length<=p,a)};d.$parsers.push(e);d.$formatters.push(e)}}function Nb(b,a){b="ngClass"+b;return function(){return{restrict:"AC",link:function(c,d,e){function g(b){if(!0=== a||c.$index%2===a){var d=f(b||"");h?ua(b,h)||e.$updateClass(d,f(h)):e.$addClass(d)}h=aa(b)}function f(a){if(K(a))return a.join(" ");if(X(a)){var b=[];q(a,function(a,c){a&&b.push(c)});return b.join(" ")}return a}var h;c.$watch(e[b],g,!0);e.$observe("class",function(a){g(c.$eval(e[b]))});"ngClass"!==b&&c.$watch("$index",function(d,g){var h=d&1;if(h!==g&1){var n=f(c.$eval(e[b]));h===a?e.$addClass(n):e.$removeClass(n)}})}}}}var x=function(b){return D(b)?b.toLowerCase():b},Ia=function(b){return D(b)?b.toUpperCase(): b},M,A,Da,va=[].slice,Rd=[].push,Ma=Object.prototype.toString,Oa=F("ng"),Ca=Z.angular||(Z.angular={}),Va,Ha,ka=["0","0","0"];M=S((/msie (\d+)/.exec(x(navigator.userAgent))||[])[1]);isNaN(M)&&(M=S((/trident\/.*; rv:(\d+)/.exec(x(navigator.userAgent))||[])[1]));w.$inject=[];Ba.$inject=[];var ba=function(){return String.prototype.trim?function(b){return D(b)?b.trim():b}:function(b){return D(b)?b.replace(/^\s\s*/,"").replace(/\s\s*$/,""):b}}();Ha=9>M?function(b){b=b.nodeName?b:b[0];return b.scopeName&& "HTML"!=b.scopeName?Ia(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var Uc=/[A-Z]/g,Sd={full:"1.2.10",major:1,minor:2,dot:10,codeName:"augmented-serendipity"},Sa=O.cache={},eb=O.expando="ng-"+(new Date).getTime(),Yc=1,Jc=Z.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},Bb=Z.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+ a,c)},Wc=/([\:\-\_]+(.))/g,Xc=/^moz([A-Z])/,yb=F("jqLite"),Ga=O.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===Q.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),O(Z).on("load",a))},toString:function(){var b=[];q(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=b?A(this[b]):A(this[this.length+b])},length:0,push:Rd,sort:[].sort,splice:[].splice},gb={};q("multiple selected checked disabled readOnly required open".split(" "),function(b){gb[x(b)]= b});var gc={};q("input select option textarea button form details".split(" "),function(b){gc[Ia(b)]=!0});q({data:cc,inheritedData:fb,scope:function(b){return A(b).data("$scope")||fb(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return A(b).data("$isolateScope")||A(b).data("$isolateScopeNoTemplate")},controller:dc,injector:function(b){return fb(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Cb,css:function(b,a,c){a=Ra(a);if(B(c))b.style[a]=c;else{var d; 8>=M&&(d=b.currentStyle&&b.currentStyle[a],""===d&&(d="auto"));d=d||b.style[a];8>=M&&(d=""===d?r:d);return d}},attr:function(b,a,c){var d=x(a);if(gb[d])if(B(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||w).specified?d:r;else if(B(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?r:b},prop:function(b,a,c){if(B(c))b[a]=c;else return b[a]},text:function(){function b(b,d){var e=a[b.nodeType];if(z(d))return e? b[e]:"";b[e]=d}var a=[];9>M?(a[1]="innerText",a[3]="nodeValue"):a[1]=a[3]="textContent";b.$dv="";return b}(),val:function(b,a){if(z(a)){if("SELECT"===Ha(b)&&b.multiple){var c=[];q(b.options,function(a){a.selected&&c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value=a},html:function(b,a){if(z(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)Ea(d[c]);b.innerHTML=a},empty:ec},function(b,a){O.prototype[a]=function(a,d){var e,g;if(b!==ec&&(2==b.length&&b!==Cb&&b!== dc?a:d)===r){if(X(a)){for(e=0;e<this.length;e++)if(b===cc)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}e=b.$dv;g=e===r?Math.min(this.length,1):this.length;for(var f=0;f<g;f++){var h=b(this[f],a,d);e=e?e+h:h}return e}for(e=0;e<this.length;e++)b(this[e],a,d);return this}});q({removeData:ac,dealoc:Ea,on:function a(c,d,e,g){if(B(g))throw yb("onargs");var f=la(c,"events"),h=la(c,"handle");f||la(c,"events",f={});h||la(c,"handle",h=Zc(c,f));q(d.split(" "),function(d){var g=f[d];if(!g){if("mouseenter"== d||"mouseleave"==d){var l=Q.body.contains||Q.body.compareDocumentPosition?function(a,c){var d=9===a.nodeType?a.documentElement:a,e=c&&c.parentNode;return a===e||!!(e&&1===e.nodeType&&(d.contains?d.contains(e):a.compareDocumentPosition&&a.compareDocumentPosition(e)&16))}:function(a,c){if(c)for(;c=c.parentNode;)if(c===a)return!0;return!1};f[d]=[];a(c,{mouseleave:"mouseout",mouseenter:"mouseover"}[d],function(a){var c=a.relatedTarget;c&&(c===this||l(this,c))||h(a,d)})}else Jc(c,d,h),f[d]=[];g=f[d]}g.push(e)})}, off:bc,one:function(a,c,d){a=A(a);a.on(c,function g(){a.off(c,d);a.off(c,g)});a.on(c,d)},replaceWith:function(a,c){var d,e=a.parentNode;Ea(a);q(new O(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];q(a.childNodes,function(a){1===a.nodeType&&c.push(a)});return c},contents:function(a){return a.childNodes||[]},append:function(a,c){q(new O(c),function(c){1!==a.nodeType&&11!==a.nodeType||a.appendChild(c)})},prepend:function(a,c){if(1===a.nodeType){var d= a.firstChild;q(new O(c),function(c){a.insertBefore(c,d)})}},wrap:function(a,c){c=A(c)[0];var d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){Ea(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;q(new O(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:Eb,removeClass:Db,toggleClass:function(a,c,d){z(d)&&(d=!Cb(a,c));(d?Eb:Db)(a,c)},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling; for(a=a.nextSibling;null!=a&&1!==a.nodeType;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName?a.getElementsByTagName(c):[]},clone:Ab,triggerHandler:function(a,c,d){c=(la(a,"events")||{})[c];d=d||[];var e=[{preventDefault:w,stopPropagation:w}];q(c,function(c){c.apply(a,e.concat(d))})}},function(a,c){O.prototype[c]=function(c,e,g){for(var f,h=0;h<this.length;h++)z(f)?(f=a(this[h],c,e,g),B(f)&&(f=A(f))):zb(f,a(this[h],c,e,g));return B(f)?f:this};O.prototype.bind=O.prototype.on; O.prototype.unbind=O.prototype.off});Ta.prototype={put:function(a,c){this[Fa(a)]=c},get:function(a){return this[Fa(a)]},remove:function(a){var c=this[a=Fa(a)];delete this[a];return c}};var ad=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,bd=/,/,cd=/^\s*(_?)(\S+?)\1\s*$/,$c=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ua=F("$injector"),Td=F("$animate"),Ud=["$provide",function(a){this.$$selectors={};this.register=function(c,d){var e=c+"-animation";if(c&&"."!=c.charAt(0))throw Td("notcsel",c);this.$$selectors[c.substr(1)]= e;a.factory(e,d)};this.classNameFilter=function(a){1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null);return this.$$classNameFilter};this.$get=["$timeout",function(a){return{enter:function(d,e,g,f){g?g.after(d):(e&&e[0]||(e=g.parent()),e.append(d));f&&a(f,0,!1)},leave:function(d,e){d.remove();e&&a(e,0,!1)},move:function(a,c,g,f){this.enter(a,c,g,f)},addClass:function(d,e,g){e=D(e)?e:K(e)?e.join(" "):"";q(d,function(a){Eb(a,e)});g&&a(g,0,!1)},removeClass:function(d,e,g){e=D(e)? e:K(e)?e.join(" "):"";q(d,function(a){Db(a,e)});g&&a(g,0,!1)},enabled:w}}]}],ja=F("$compile");jc.$inject=["$provide","$$sanitizeUriProvider"];var id=/^(x[\:\-_]|data[\:\-_])/i,pc=F("$interpolate"),Vd=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,td={http:80,https:443,ftp:21},Ib=F("$location");uc.prototype=Jb.prototype=tc.prototype={$$html5:!1,$$replace:!1,absUrl:jb("$$absUrl"),url:function(a,c){if(z(a))return this.$$url;var d=Vd.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));(d[2]||d[1])&&this.search(d[3]|| "");this.hash(d[5]||"",c);return this},protocol:jb("$$protocol"),host:jb("$$host"),port:jb("$$port"),path:vc("$$path",function(a){return"/"==a.charAt(0)?a:"/"+a}),search:function(a,c){switch(arguments.length){case 0:return this.$$search;case 1:if(D(a))this.$$search=Xb(a);else if(X(a))this.$$search=a;else throw Ib("isrcharg");break;default:z(c)||null===c?delete this.$$search[a]:this.$$search[a]=c}this.$$compose();return this},hash:vc("$$hash",Ba),replace:function(){this.$$replace=!0;return this}}; var za=F("$parse"),yc={},ra,Ka={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:w,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return B(d)?B(e)?d+e:d:B(e)?e:r},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(B(d)?d:0)-(B(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a,c)^e(a,c)},"=":w,"===":function(a,c,d,e){return d(a,c)===e(a,c)}, "!==":function(a,c,d,e){return d(a,c)!==e(a,c)},"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))}, "!":function(a,c,d){return!d(a,c)}},Wd={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Lb=function(a){this.options=a};Lb.prototype={constructor:Lb,lex:function(a){this.text=a;this.index=0;this.ch=r;this.lastCh=":";this.tokens=[];var c;for(a=[];this.index<this.text.length;){this.ch=this.text.charAt(this.index);if(this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent(),this.was("{,")&& ("{"===a[0]&&(c=this.tokens[this.tokens.length-1]))&&(c.json=-1===c.text.indexOf("."));else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch,json:this.was(":[,")&&this.is("{[")||this.is("}]:,")}),this.is("{[")&&a.unshift(this.ch),this.is("}]")&&a.shift(),this.index++;else if(this.isWhitespace(this.ch)){this.index++;continue}else{var d=this.ch+this.peek(),e=d+this.peek(2),g=Ka[this.ch],f=Ka[d],h=Ka[e];h?(this.tokens.push({index:this.index,text:e,fn:h}),this.index+=3):f?(this.tokens.push({index:this.index, text:d,fn:f}),this.index+=2):g?(this.tokens.push({index:this.index,text:this.ch,fn:g,json:this.was("[,:")&&this.is("+-")}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}this.lastCh=this.ch}return this.tokens},is:function(a){return-1!==a.indexOf(this.ch)},was:function(a){return-1!==a.indexOf(this.lastCh)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a},isWhitespace:function(a){return" "=== a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,c,d){d=d||this.index;c=B(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+"]":" "+d;throw za("lexerr",a,c,this.text);},readNumber:function(){for(var a="",c=this.index;this.index<this.text.length;){var d=x(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var e= this.peek();if("e"==d&&this.isExpOperator(e))a+=d;else if(this.isExpOperator(d)&&e&&this.isNumber(e)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||e&&this.isNumber(e)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}a*=1;this.tokens.push({index:c,text:a,json:!0,fn:function(){return a}})},readIdent:function(){for(var a=this,c="",d=this.index,e,g,f,h;this.index<this.text.length;){h=this.text.charAt(this.index);if("."===h||this.isIdent(h)||this.isNumber(h))"."=== h&&(e=this.index),c+=h;else break;this.index++}if(e)for(g=this.index;g<this.text.length;){h=this.text.charAt(g);if("("===h){f=c.substr(e-d+1);c=c.substr(0,e-d);this.index=g;break}if(this.isWhitespace(h))g++;else break}d={index:d,text:c};if(Ka.hasOwnProperty(c))d.fn=Ka[c],d.json=Ka[c];else{var m=xc(c,this.options,this.text);d.fn=t(function(a,c){return m(a,c)},{assign:function(d,e){return kb(d,c,e,a.text,a.options)}})}this.tokens.push(d);f&&(this.tokens.push({index:e,text:".",json:!1}),this.tokens.push({index:e+ 1,text:f,json:!1}))},readString:function(a){var c=this.index;this.index++;for(var d="",e=a,g=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),e=e+f;if(g)"u"===f?(f=this.text.substring(this.index+1,this.index+5),f.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+f+"]"),this.index+=4,d+=String.fromCharCode(parseInt(f,16))):d=(g=Wd[f])?d+g:d+f,g=!1;else if("\\"===f)g=!0;else{if(f===a){this.index++;this.tokens.push({index:c,text:e,string:d,json:!0,fn:function(){return d}}); return}d+=f}this.index++}this.throwError("Unterminated quote",c)}};var Za=function(a,c,d){this.lexer=a;this.$filter=c;this.options=d};Za.ZERO=function(){return 0};Za.prototype={constructor:Za,parse:function(a,c){this.text=a;this.json=c;this.tokens=this.lexer.lex(a);c&&(this.assignment=this.logicalOR,this.functionCall=this.fieldAccess=this.objectIndex=this.filterChain=function(){this.throwError("is not valid json",{text:a,index:0})});var d=c?this.primary():this.statements();0!==this.tokens.length&& this.throwError("is an unexpected token",this.tokens[0]);d.literal=!!d.literal;d.constant=!!d.constant;return d},primary:function(){var a;if(this.expect("("))a=this.filterChain(),this.consume(")");else if(this.expect("["))a=this.arrayDeclaration();else if(this.expect("{"))a=this.object();else{var c=this.expect();(a=c.fn)||this.throwError("not a primary expression",c);c.json&&(a.constant=!0,a.literal=!0)}for(var d;c=this.expect("(","[",".");)"("===c.text?(a=this.functionCall(a,d),d=null):"["===c.text? (d=a,a=this.objectIndex(a)):"."===c.text?(d=a,a=this.fieldAccess(a)):this.throwError("IMPOSSIBLE");return a},throwError:function(a,c){throw za("syntax",c.text,a,c.index+1,this.text,this.text.substring(c.index));},peekToken:function(){if(0===this.tokens.length)throw za("ueoe",this.text);return this.tokens[0]},peek:function(a,c,d,e){if(0<this.tokens.length){var g=this.tokens[0],f=g.text;if(f===a||f===c||f===d||f===e||!(a||c||d||e))return g}return!1},expect:function(a,c,d,e){return(a=this.peek(a,c,d, e))?(this.json&&!a.json&&this.throwError("is not valid json",a),this.tokens.shift(),a):!1},consume:function(a){this.expect(a)||this.throwError("is unexpected, expecting ["+a+"]",this.peek())},unaryFn:function(a,c){return t(function(d,e){return a(d,e,c)},{constant:c.constant})},ternaryFn:function(a,c,d){return t(function(e,g){return a(e,g)?c(e,g):d(e,g)},{constant:a.constant&&c.constant&&d.constant})},binaryFn:function(a,c,d){return t(function(e,g){return c(e,g,a,d)},{constant:a.constant&&d.constant})}, statements:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.filterChain()),!this.expect(";"))return 1===a.length?a[0]:function(c,d){for(var e,g=0;g<a.length;g++){var f=a[g];f&&(e=f(c,d))}return e}},filterChain:function(){for(var a=this.expression(),c;;)if(c=this.expect("|"))a=this.binaryFn(a,c.fn,this.filter());else return a},filter:function(){for(var a=this.expect(),c=this.$filter(a.text),d=[];;)if(a=this.expect(":"))d.push(this.expression());else{var e= function(a,e,h){h=[h];for(var m=0;m<d.length;m++)h.push(d[m](a,e));return c.apply(a,h)};return function(){return e}}},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary(),c,d;return(d=this.expect("="))?(a.assign||this.throwError("implies assignment but ["+this.text.substring(0,d.index)+"] can not be assigned to",d),c=this.ternary(),function(d,g){return a.assign(d,c(d,g),g)}):a},ternary:function(){var a=this.logicalOR(),c,d;if(this.expect("?")){c=this.ternary(); if(d=this.expect(":"))return this.ternaryFn(a,c,this.ternary());this.throwError("expected :",d)}else return a},logicalOR:function(){for(var a=this.logicalAND(),c;;)if(c=this.expect("||"))a=this.binaryFn(a,c.fn,this.logicalAND());else return a},logicalAND:function(){var a=this.equality(),c;if(c=this.expect("&&"))a=this.binaryFn(a,c.fn,this.logicalAND());return a},equality:function(){var a=this.relational(),c;if(c=this.expect("==","!=","===","!=="))a=this.binaryFn(a,c.fn,this.equality());return a}, relational:function(){var a=this.additive(),c;if(c=this.expect("<",">","<=",">="))a=this.binaryFn(a,c.fn,this.relational());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.fn,this.multiplicative());return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*","/","%");)a=this.binaryFn(a,c.fn,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(Za.ZERO,a.fn, this.unary()):(a=this.expect("!"))?this.unaryFn(a.fn,this.unary()):this.primary()},fieldAccess:function(a){var c=this,d=this.expect().text,e=xc(d,this.options,this.text);return t(function(c,d,h){return e(h||a(c,d))},{assign:function(e,f,h){return kb(a(e,h),d,f,c.text,c.options)}})},objectIndex:function(a){var c=this,d=this.expression();this.consume("]");return t(function(e,g){var f=a(e,g),h=d(e,g),m;if(!f)return r;(f=Ya(f[h],c.text))&&(f.then&&c.options.unwrapPromises)&&(m=f,"$$v"in f||(m.$$v=r,m.then(function(a){m.$$v= a})),f=f.$$v);return f},{assign:function(e,g,f){var h=d(e,f);return Ya(a(e,f),c.text)[h]=g}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression());while(this.expect(","))}this.consume(")");var e=this;return function(g,f){for(var h=[],m=c?c(g,f):g,k=0;k<d.length;k++)h.push(d[k](g,f));k=a(g,f,m)||w;Ya(m,e.text);Ya(k,e.text);h=k.apply?k.apply(m,h):k(h[0],h[1],h[2],h[3],h[4]);return Ya(h,e.text)}},arrayDeclaration:function(){var a=[],c=!0;if("]"!==this.peekToken().text){do{var d= this.expression();a.push(d);d.constant||(c=!1)}while(this.expect(","))}this.consume("]");return t(function(c,d){for(var f=[],h=0;h<a.length;h++)f.push(a[h](c,d));return f},{literal:!0,constant:c})},object:function(){var a=[],c=!0;if("}"!==this.peekToken().text){do{var d=this.expect(),d=d.string||d.text;this.consume(":");var e=this.expression();a.push({key:d,value:e});e.constant||(c=!1)}while(this.expect(","))}this.consume("}");return t(function(c,d){for(var e={},m=0;m<a.length;m++){var k=a[m];e[k.key]= k.value(c,d)}return e},{literal:!0,constant:c})}};var Kb={},sa=F("$sce"),fa={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Y=Q.createElement("a"),Ac=ya(Z.location.href,!0);Bc.$inject=["$provide"];Cc.$inject=["$locale"];Ec.$inject=["$locale"];var Hc=".",Qd={yyyy:W("FullYear",4),yy:W("FullYear",2,0,!0),y:W("FullYear",1),MMMM:lb("Month"),MMM:lb("Month",!0),MM:W("Month",2,1),M:W("Month",1,1),dd:W("Date",2),d:W("Date",1),HH:W("Hours",2),H:W("Hours",1),hh:W("Hours",2,-12),h:W("Hours", 1,-12),mm:W("Minutes",2),m:W("Minutes",1),ss:W("Seconds",2),s:W("Seconds",1),sss:W("Milliseconds",3),EEEE:lb("Day"),EEE:lb("Day",!0),a:function(a,c){return 12>a.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Mb(Math[0<a?"floor":"ceil"](a/60),2)+Mb(Math.abs(a%60),2))}},Pd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,Od=/^\-?\d+$/;Dc.$inject=["$locale"];var Md=$(x),Nd=$(Ia);Fc.$inject=["$parse"];var Xd=$({restrict:"E", compile:function(a,c){8>=M&&(c.href||c.name||c.$set("href",""),a.append(Q.createComment("IE fix")));if(!c.href&&!c.xlinkHref&&!c.name)return function(a,c){var g="[object SVGAnimatedString]"===Ma.call(c.prop("href"))?"xlink:href":"href";c.on("click",function(a){c.attr(g)||a.preventDefault()})}}}),Ob={};q(gb,function(a,c){if("multiple"!=a){var d=ma("ng-"+c);Ob[d]=function(){return{priority:100,link:function(a,g,f){a.$watch(f[d],function(a){f.$set(c,!!a)})}}}}});q(["src","srcset","href"],function(a){var c= ma("ng-"+a);Ob[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),M&&e.prop(a,g[a]))})}}}});var ob={$addControl:w,$removeControl:w,$setValidity:w,$setDirty:w,$setPristine:w};Ic.$inject=["$element","$attrs","$scope"];var Kc=function(a){return["$timeout",function(c){return{name:"form",restrict:a?"EAC":"E",controller:Ic,compile:function(){return{pre:function(a,e,g,f){if(!g.action){var h=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};Jc(e[0], "submit",h);e.on("$destroy",function(){c(function(){Bb(e[0],"submit",h)},0,!1)})}var m=e.parent().controller("form"),k=g.name||g.ngForm;k&&kb(a,k,f,k);if(m)e.on("$destroy",function(){m.$removeControl(f);k&&kb(a,k,r,k);t(f,ob)})}}}}}]},Yd=Kc(),Zd=Kc(!0),$d=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,ae=/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i,be=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Lc={text:qb,number:function(a,c,d,e,g,f){qb(a,c,d,e,g,f); e.$parsers.push(function(a){var c=e.$isEmpty(a);if(c||be.test(a))return e.$setValidity("number",!0),""===a?null:c?a:parseFloat(a);e.$setValidity("number",!1);return r});e.$formatters.push(function(a){return e.$isEmpty(a)?"":""+a});d.min&&(a=function(a){var c=parseFloat(d.min);return pa(e,"min",e.$isEmpty(a)||a>=c,a)},e.$parsers.push(a),e.$formatters.push(a));d.max&&(a=function(a){var c=parseFloat(d.max);return pa(e,"max",e.$isEmpty(a)||a<=c,a)},e.$parsers.push(a),e.$formatters.push(a));e.$formatters.push(function(a){return pa(e, "number",e.$isEmpty(a)||sb(a),a)})},url:function(a,c,d,e,g,f){qb(a,c,d,e,g,f);a=function(a){return pa(e,"url",e.$isEmpty(a)||$d.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,f){qb(a,c,d,e,g,f);a=function(a){return pa(e,"email",e.$isEmpty(a)||ae.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){z(d.name)&&c.attr("name",$a());c.on("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked= d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,f=d.ngFalseValue;D(g)||(g=!0);D(f)||(f=!1);c.on("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$isEmpty=function(a){return a!==g};e.$formatters.push(function(a){return a===g});e.$parsers.push(function(a){return a?g:f})},hidden:w,button:w,submit:w,reset:w},Mc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel", link:function(d,e,g,f){f&&(Lc[x(g.type)]||Lc.text)(d,e,g,f,c,a)}}}],nb="ng-valid",mb="ng-invalid",Ja="ng-pristine",pb="ng-dirty",ce=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,c,d,e,g){function f(a,c){c=c?"-"+db(c,"-"):"";e.removeClass((a?mb:nb)+c).addClass((a?nb:mb)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var h=g(d.ngModel), m=h.assign;if(!m)throw F("ngModel")("nonassign",d.ngModel,ga(e));this.$render=w;this.$isEmpty=function(a){return z(a)||""===a||null===a||a!==a};var k=e.inheritedData("$formController")||ob,l=0,n=this.$error={};e.addClass(Ja);f(!0);this.$setValidity=function(a,c){n[a]!==!c&&(c?(n[a]&&l--,l||(f(!0),this.$valid=!0,this.$invalid=!1)):(f(!1),this.$invalid=!0,this.$valid=!1,l++),n[a]=!c,f(c,a),k.$setValidity(a,c,this))};this.$setPristine=function(){this.$dirty=!1;this.$pristine=!0;e.removeClass(pb).addClass(Ja)}; this.$setViewValue=function(d){this.$viewValue=d;this.$pristine&&(this.$dirty=!0,this.$pristine=!1,e.removeClass(Ja).addClass(pb),k.$setDirty());q(this.$parsers,function(a){d=a(d)});this.$modelValue!==d&&(this.$modelValue=d,m(a,d),q(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}}))};var p=this;a.$watch(function(){var c=h(a);if(p.$modelValue!==c){var d=p.$formatters,e=d.length;for(p.$modelValue=c;e--;)c=d[e](c);p.$viewValue!==c&&(p.$viewValue=c,p.$render())}return c})}],de=function(){return{require:["ngModel", "^?form"],controller:ce,link:function(a,c,d,e){var g=e[0],f=e[1]||ob;f.$addControl(g);a.$on("$destroy",function(){f.$removeControl(g)})}}},ee=$({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Nc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var g=function(a){if(d.required&&e.$isEmpty(a))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required", function(){g(e.$viewValue)})}}}},fe=function(){return{require:"ngModel",link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){if(!z(a)){var c=[];a&&q(a.split(g),function(a){a&&c.push(ba(a))});return c}});e.$formatters.push(function(a){return K(a)?a.join(", "):r});e.$isEmpty=function(a){return!a||!a.length}}}},ge=/^(true|false|\d+)$/,he=function(){return{priority:100,compile:function(a,c){return ge.test(c.ngValue)?function(a,c,g){g.$set("value", a.$eval(g.ngValue))}:function(a,c,g){a.$watch(g.ngValue,function(a){g.$set("value",a)})}}}},ie=ta(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==r?"":a)})}),je=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],ke=["$sce","$parse",function(a,c){return function(d,e,g){e.addClass("ng-binding").data("$binding", g.ngBindHtml);var f=c(g.ngBindHtml);d.$watch(function(){return(f(d)||"").toString()},function(c){e.html(a.getTrustedHtml(f(d))||"")})}}],le=Nb("",!0),me=Nb("Odd",0),ne=Nb("Even",1),oe=ta({compile:function(a,c){c.$set("ngCloak",r);a.removeClass("ng-cloak")}}),pe=[function(){return{scope:!0,controller:"@",priority:500}}],Oc={};q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var c=ma("ng-"+ a);Oc[c]=["$parse",function(d){return{compile:function(e,g){var f=d(g[c]);return function(c,d,e){d.on(x(a),function(a){c.$apply(function(){f(c,{$event:a})})})}}}}]});var qe=["$animate",function(a){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,g,f){var h,m;c.$watch(e.ngIf,function(g){Pa(g)?m||(m=c.$new(),f(m,function(c){c[c.length++]=Q.createComment(" end ngIf: "+e.ngIf+" ");h={clone:c};a.enter(c,d.parent(),d)})):(m&&(m.$destroy(),m=null),h&&(a.leave(wb(h.clone)), h=null))})}}}],re=["$http","$templateCache","$anchorScroll","$animate","$sce",function(a,c,d,e,g){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ca.noop,compile:function(f,h){var m=h.ngInclude||h.src,k=h.onload||"",l=h.autoscroll;return function(f,h,q,r,y){var A=0,u,t,H=function(){u&&(u.$destroy(),u=null);t&&(e.leave(t),t=null)};f.$watch(g.parseAsResourceUrl(m),function(g){var m=function(){!B(l)||l&&!f.$eval(l)||d()},q=++A;g?(a.get(g,{cache:c}).success(function(a){if(q=== A){var c=f.$new();r.template=a;a=y(c,function(a){H();e.enter(a,null,h,m)});u=c;t=a;u.$emit("$includeContentLoaded");f.$eval(k)}}).error(function(){q===A&&H()}),f.$emit("$includeContentRequested")):(H(),r.template=null)})}}}}],se=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,g){d.html(g.template);a(d.contents())(c)}}}],te=ta({priority:450,compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),ue=ta({terminal:!0,priority:1E3}),ve=["$locale", "$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,f){var h=f.count,m=f.$attr.when&&g.attr(f.$attr.when),k=f.offset||0,l=e.$eval(m)||{},n={},p=c.startSymbol(),s=c.endSymbol(),r=/^when(Minus)?(.+)$/;q(f,function(a,c){r.test(c)&&(l[x(c.replace("when","").replace("Minus","-"))]=g.attr(f.$attr[c]))});q(l,function(a,e){n[e]=c(a.replace(d,p+h+"-"+k+s))});e.$watch(function(){var c=parseFloat(e.$eval(h));if(isNaN(c))return"";c in l||(c=a.pluralCat(c-k));return n[c](e,g,!0)},function(a){g.text(a)})}}}], we=["$parse","$animate",function(a,c){var d=F("ngRepeat");return{transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,link:function(e,g,f,h,m){var k=f.ngRepeat,l=k.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),n,p,s,r,y,t,u={$id:Fa};if(!l)throw d("iexp",k);f=l[1];h=l[2];(l=l[3])?(n=a(l),p=function(a,c,d){t&&(u[t]=a);u[y]=c;u.$index=d;return n(e,u)}):(s=function(a,c){return Fa(c)},r=function(a){return a});l=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!l)throw d("iidexp", f);y=l[3]||l[1];t=l[2];var B={};e.$watchCollection(h,function(a){var f,h,l=g[0],n,u={},z,P,D,x,T,w,F=[];if(rb(a))T=a,n=p||s;else{n=p||r;T=[];for(D in a)a.hasOwnProperty(D)&&"$"!=D.charAt(0)&&T.push(D);T.sort()}z=T.length;h=F.length=T.length;for(f=0;f<h;f++)if(D=a===T?f:T[f],x=a[D],x=n(D,x,f),xa(x,"`track by` id"),B.hasOwnProperty(x))w=B[x],delete B[x],u[x]=w,F[f]=w;else{if(u.hasOwnProperty(x))throw q(F,function(a){a&&a.scope&&(B[a.id]=a)}),d("dupes",k,x);F[f]={id:x};u[x]=!1}for(D in B)B.hasOwnProperty(D)&& (w=B[D],f=wb(w.clone),c.leave(f),q(f,function(a){a.$$NG_REMOVED=!0}),w.scope.$destroy());f=0;for(h=T.length;f<h;f++){D=a===T?f:T[f];x=a[D];w=F[f];F[f-1]&&(l=F[f-1].clone[F[f-1].clone.length-1]);if(w.scope){P=w.scope;n=l;do n=n.nextSibling;while(n&&n.$$NG_REMOVED);w.clone[0]!=n&&c.move(wb(w.clone),null,A(l));l=w.clone[w.clone.length-1]}else P=e.$new();P[y]=x;t&&(P[t]=D);P.$index=f;P.$first=0===f;P.$last=f===z-1;P.$middle=!(P.$first||P.$last);P.$odd=!(P.$even=0===(f&1));w.scope||m(P,function(a){a[a.length++]= Q.createComment(" end ngRepeat: "+k+" ");c.enter(a,null,A(l));l=a;w.scope=P;w.clone=a;u[w.id]=w})}B=u})}}}],xe=["$animate",function(a){return function(c,d,e){c.$watch(e.ngShow,function(c){a[Pa(c)?"removeClass":"addClass"](d,"ng-hide")})}}],ye=["$animate",function(a){return function(c,d,e){c.$watch(e.ngHide,function(c){a[Pa(c)?"addClass":"removeClass"](d,"ng-hide")})}}],ze=ta(function(a,c,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&q(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Ae=["$animate", function(a){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,g){var f,h,m=[];c.$watch(e.ngSwitch||e.on,function(d){for(var l=0,n=m.length;l<n;l++)m[l].$destroy(),a.leave(h[l]);h=[];m=[];if(f=g.cases["!"+d]||g.cases["?"])c.$eval(e.change),q(f,function(d){var e=c.$new();m.push(e);d.transclude(e,function(c){var e=d.element;h.push(c);a.enter(c,e.parent(),e)})})})}}}],Be=ta({transclude:"element",priority:800,require:"^ngSwitch",link:function(a, c,d,e,g){e.cases["!"+d.ngSwitchWhen]=e.cases["!"+d.ngSwitchWhen]||[];e.cases["!"+d.ngSwitchWhen].push({transclude:g,element:c})}}),Ce=ta({transclude:"element",priority:800,require:"^ngSwitch",link:function(a,c,d,e,g){e.cases["?"]=e.cases["?"]||[];e.cases["?"].push({transclude:g,element:c})}}),De=ta({controller:["$element","$transclude",function(a,c){if(!c)throw F("ngTransclude")("orphan",ga(a));this.$transclude=c}],link:function(a,c,d,e){e.$transclude(function(a){c.empty();c.append(a)})}}),Ee=["$templateCache", function(a){return{restrict:"E",terminal:!0,compile:function(c,d){"text/ng-template"==d.type&&a.put(d.id,c[0].text)}}}],Fe=F("ngOptions"),Ge=$({terminal:!0}),He=["$compile","$parse",function(a,c){var d=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,e={$setViewValue:w};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope", "$attrs",function(a,c,d){var m=this,k={},l=e,n;m.databound=d.ngModel;m.init=function(a,c,d){l=a;n=d};m.addOption=function(c){xa(c,'"option value"');k[c]=!0;l.$viewValue==c&&(a.val(c),n.parent()&&n.remove())};m.removeOption=function(a){this.hasOption(a)&&(delete k[a],l.$viewValue==a&&this.renderUnknownOption(a))};m.renderUnknownOption=function(c){c="? "+Fa(c)+" ?";n.val(c);a.prepend(n);a.val(c);n.prop("selected",!0)};m.hasOption=function(a){return k.hasOwnProperty(a)};c.$on("$destroy",function(){m.renderUnknownOption= w})}],link:function(e,f,h,m){function k(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(x.parent()&&x.remove(),c.val(a),""===a&&w.prop("selected",!0)):z(a)&&w?c.val(""):e.renderUnknownOption(a)};c.on("change",function(){a.$apply(function(){x.parent()&&x.remove();d.$setViewValue(c.val())})})}function l(a,c,d){var e;d.$render=function(){var a=new Ta(d.$viewValue);q(c.find("option"),function(c){c.selected=B(a.get(c.value))})};a.$watch(function(){ua(e,d.$viewValue)||(e=aa(d.$viewValue), d.$render())});c.on("change",function(){a.$apply(function(){var a=[];q(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function n(e,f,g){function h(){var a={"":[]},c=[""],d,k,r,t,v;t=g.$modelValue;v=A(e)||[];var C=n?Pb(v):v,F,I,z;I={};r=!1;var E,H;if(s)if(w&&K(t))for(r=new Ta([]),z=0;z<t.length;z++)I[m]=t[z],r.put(w(e,I),t[z]);else r=new Ta(t);for(z=0;F=C.length,z<F;z++){k=z;if(n){k=C[z];if("$"===k.charAt(0))continue;I[n]=k}I[m]=v[k];d=p(e,I)||"";(k=a[d])||(k=a[d]= [],c.push(d));s?d=B(r.remove(w?w(e,I):q(e,I))):(w?(d={},d[m]=t,d=w(e,d)===w(e,I)):d=t===q(e,I),r=r||d);E=l(e,I);E=B(E)?E:"";k.push({id:w?w(e,I):n?C[z]:z,label:E,selected:d})}s||(y||null===t?a[""].unshift({id:"",label:"",selected:!r}):r||a[""].unshift({id:"?",label:"",selected:!0}));I=0;for(C=c.length;I<C;I++){d=c[I];k=a[d];x.length<=I?(t={element:D.clone().attr("label",d),label:k.label},v=[t],x.push(v),f.append(t.element)):(v=x[I],t=v[0],t.label!=d&&t.element.attr("label",t.label=d));E=null;z=0;for(F= k.length;z<F;z++)r=k[z],(d=v[z+1])?(E=d.element,d.label!==r.label&&E.text(d.label=r.label),d.id!==r.id&&E.val(d.id=r.id),E[0].selected!==r.selected&&E.prop("selected",d.selected=r.selected)):(""===r.id&&y?H=y:(H=u.clone()).val(r.id).attr("selected",r.selected).text(r.label),v.push({element:H,label:r.label,id:r.id,selected:r.selected}),E?E.after(H):t.element.append(H),E=H);for(z++;v.length>z;)v.pop().element.remove()}for(;x.length>I;)x.pop()[0].element.remove()}var k;if(!(k=t.match(d)))throw Fe("iexp", t,ga(f));var l=c(k[2]||k[1]),m=k[4]||k[6],n=k[5],p=c(k[3]||""),q=c(k[2]?k[1]:m),A=c(k[7]),w=k[8]?c(k[8]):null,x=[[{element:f,label:""}]];y&&(a(y)(e),y.removeClass("ng-scope"),y.remove());f.empty();f.on("change",function(){e.$apply(function(){var a,c=A(e)||[],d={},h,k,l,p,t,u,v;if(s)for(k=[],p=0,u=x.length;p<u;p++)for(a=x[p],l=1,t=a.length;l<t;l++){if((h=a[l].element)[0].selected){h=h.val();n&&(d[n]=h);if(w)for(v=0;v<c.length&&(d[m]=c[v],w(e,d)!=h);v++);else d[m]=c[h];k.push(q(e,d))}}else if(h=f.val(), "?"==h)k=r;else if(""===h)k=null;else if(w)for(v=0;v<c.length;v++){if(d[m]=c[v],w(e,d)==h){k=q(e,d);break}}else d[m]=c[h],n&&(d[n]=h),k=q(e,d);g.$setViewValue(k)})});g.$render=h;e.$watch(h)}if(m[1]){var p=m[0];m=m[1];var s=h.multiple,t=h.ngOptions,y=!1,w,u=A(Q.createElement("option")),D=A(Q.createElement("optgroup")),x=u.clone();h=0;for(var v=f.children(),F=v.length;h<F;h++)if(""===v[h].value){w=y=v.eq(h);break}p.init(m,y,x);s&&(m.$isEmpty=function(a){return!a||0===a.length});t?n(e,f,m):s?l(e,f,m): k(e,f,m,p)}}}}],Ie=["$interpolate",function(a){var c={addOption:w,removeOption:w};return{restrict:"E",priority:100,compile:function(d,e){if(z(e.value)){var g=a(d.text(),!0);g||e.$set("value",d.text())}return function(a,d,e){var k=d.parent(),l=k.data("$selectController")||k.parent().data("$selectController");l&&l.databound?d.prop("selected",!1):l=c;g?a.$watch(g,function(a,c){e.$set("value",a);a!==c&&l.removeOption(c);l.addOption(a)}):l.addOption(e.value);d.on("$destroy",function(){l.removeOption(e.value)})}}}}], Je=$({restrict:"E",terminal:!0});(Da=Z.jQuery)?(A=Da,t(Da.fn,{scope:Ga.scope,isolateScope:Ga.isolateScope,controller:Ga.controller,injector:Ga.injector,inheritedData:Ga.inheritedData}),xb("remove",!0,!0,!1),xb("empty",!1,!1,!1),xb("html",!1,!1,!0)):A=O;Ca.element=A;(function(a){t(a,{bootstrap:Zb,copy:aa,extend:t,equals:ua,element:A,forEach:q,injector:$b,noop:w,bind:cb,toJson:qa,fromJson:Vb,identity:Ba,isUndefined:z,isDefined:B,isString:D,isFunction:L,isObject:X,isNumber:sb,isElement:Qc,isArray:K, version:Sd,isDate:La,lowercase:x,uppercase:Ia,callbacks:{counter:0},$$minErr:F,$$csp:Ub});Va=Vc(Z);try{Va("ngLocale")}catch(c){Va("ngLocale",[]).provider("$locale",sd)}Va("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Cd});a.provider("$compile",jc).directive({a:Xd,input:Mc,textarea:Mc,form:Yd,script:Ee,select:He,style:Je,option:Ie,ngBind:ie,ngBindHtml:ke,ngBindTemplate:je,ngClass:le,ngClassEven:ne,ngClassOdd:me,ngCloak:oe,ngController:pe,ngForm:Zd,ngHide:ye,ngIf:qe,ngInclude:re, ngInit:te,ngNonBindable:ue,ngPluralize:ve,ngRepeat:we,ngShow:xe,ngStyle:ze,ngSwitch:Ae,ngSwitchWhen:Be,ngSwitchDefault:Ce,ngOptions:Ge,ngTransclude:De,ngModel:de,ngList:fe,ngChange:ee,required:Nc,ngRequired:Nc,ngValue:he}).directive({ngInclude:se}).directive(Ob).directive(Oc);a.provider({$anchorScroll:dd,$animate:Ud,$browser:fd,$cacheFactory:gd,$controller:jd,$document:kd,$exceptionHandler:ld,$filter:Bc,$interpolate:qd,$interval:rd,$http:md,$httpBackend:od,$location:ud,$log:vd,$parse:yd,$rootScope:Bd, $q:zd,$sce:Fd,$sceDelegate:Ed,$sniffer:Gd,$templateCache:hd,$timeout:Hd,$window:Id})}])})(Ca);A(Q).ready(function(){Tc(Q,Zb)})})(window,document);!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}</style>'); //# sourceMappingURL=angular.min.js.map
Java
package org.glob3.mobile.specific; import java.util.Map; import org.glob3.mobile.generated.IByteBuffer; import org.glob3.mobile.generated.IJSONParser; import org.glob3.mobile.generated.JSONArray; import org.glob3.mobile.generated.JSONBaseObject; import org.glob3.mobile.generated.JSONBoolean; import org.glob3.mobile.generated.JSONDouble; import org.glob3.mobile.generated.JSONFloat; import org.glob3.mobile.generated.JSONInteger; import org.glob3.mobile.generated.JSONLong; import org.glob3.mobile.generated.JSONNull; import org.glob3.mobile.generated.JSONObject; import org.glob3.mobile.generated.JSONString; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.google.gson.JsonPrimitive; public class JSONParser_JavaDesktop extends IJSONParser { @Override public JSONBaseObject parse(final IByteBuffer buffer, final boolean nullAsObject) { return parse(buffer.getAsString(), nullAsObject); } @Override public JSONBaseObject parse(final String string, final boolean nullAsObject) { final JsonParser parser = new JsonParser(); final JsonElement element = parser.parse(string); return convert(element, nullAsObject); } private JSONBaseObject convert(final JsonElement element, final boolean nullAsObject) { if (element.isJsonNull()) { return nullAsObject ? new JSONNull() : null; } else if (element.isJsonObject()) { final JsonObject jsonObject = (JsonObject) element; final JSONObject result = new JSONObject(); for (final Map.Entry<String, JsonElement> entry : jsonObject.entrySet()) { result.put(entry.getKey(), convert(entry.getValue(), nullAsObject)); } return result; } else if (element.isJsonPrimitive()) { final JsonPrimitive jsonPrimitive = (JsonPrimitive) element; if (jsonPrimitive.isBoolean()) { return new JSONBoolean(jsonPrimitive.getAsBoolean()); } else if (jsonPrimitive.isNumber()) { final double doubleValue = jsonPrimitive.getAsDouble(); final long longValue = (long) doubleValue; if (doubleValue == longValue) { final int intValue = (int) longValue; return (intValue == longValue) ? new JSONInteger(intValue) : new JSONLong(longValue); } final float floatValue = (float) doubleValue; return (floatValue == doubleValue) ? new JSONFloat(floatValue) : new JSONDouble(doubleValue); } else if (jsonPrimitive.isString()) { return new JSONString(jsonPrimitive.getAsString()); } else { throw new RuntimeException("JSON unsopoerted" + element.getClass()); } } else if (element.isJsonArray()) { final JsonArray jsonArray = (JsonArray) element; final JSONArray result = new JSONArray(); for (final JsonElement child : jsonArray) { result.add(convert(child, nullAsObject)); } return result; } else { throw new RuntimeException("JSON unsopoerted" + element.getClass()); } } }
Java
/* Copyright (c) Citrix Systems, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, * with or without modification, are permitted provided * that the following conditions are met: * * * Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the * following disclaimer in the documentation and/or other * materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ using System; using System.Collections.Generic; using System.Linq; using XenAdmin.Core; using XenAPI; namespace XenAdmin.Actions { public class EnableHAAction : PureAsyncAction { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private readonly Dictionary<VM, VMStartupOptions> startupOptions; private readonly SR[] heartbeatSRs; private readonly long failuresToTolerate; public EnableHAAction(Pool pool, Dictionary<VM, VMStartupOptions> startupOptions, List<SR> heartbeatSRs, long failuresToTolerate) : base(pool.Connection, string.Format(Messages.ENABLING_HA_ON, Helpers.GetName(pool).Ellipsise(50)), Messages.ENABLING_HA, false) { if (heartbeatSRs.Count == 0) throw new ArgumentException("You must specify at least 1 heartbeat SR"); Pool = pool; this.startupOptions = startupOptions; this.heartbeatSRs = heartbeatSRs.ToArray(); this.failuresToTolerate = failuresToTolerate; } public List<SR> HeartbeatSRs { get { return new List<SR>(heartbeatSRs); } } protected override void Run() { if (startupOptions != null) { double increment = 10.0 / Math.Max(startupOptions.Count, 1); int i = 0; // First set any VM restart priorities supplied foreach (VM vm in startupOptions.Keys) { // Set new VM restart priority and ha_always_run log.DebugFormat("Setting HA priority on {0} to {1}", vm.Name(), startupOptions[vm].HaRestartPriority); XenAPI.VM.SetHaRestartPriority(this.Session, vm, (VM.HA_Restart_Priority)startupOptions[vm].HaRestartPriority); // Set new VM order and start_delay log.DebugFormat("Setting start order on {0} to {1}", vm.Name(), startupOptions[vm].Order); XenAPI.VM.set_order(this.Session, vm.opaque_ref, startupOptions[vm].Order); log.DebugFormat("Setting start order on {0} to {1}", vm.Name(), startupOptions[vm].StartDelay); XenAPI.VM.set_start_delay(this.Session, vm.opaque_ref, startupOptions[vm].StartDelay); this.PercentComplete = (int)(++i * increment); } } this.PercentComplete = 10; log.DebugFormat("Setting ha_host_failures_to_tolerate to {0}", failuresToTolerate); XenAPI.Pool.set_ha_host_failures_to_tolerate(this.Session, Pool.opaque_ref, failuresToTolerate); var refs = heartbeatSRs.Select(sr => new XenRef<SR>(sr.opaque_ref)).ToList(); try { log.Debug("Enabling HA for pool " + Pool.Name()); // NB the line below also performs a pool db sync RelatedTask = XenAPI.Pool.async_enable_ha(this.Session, refs, new Dictionary<string, string>()); PollToCompletion(15, 100); log.Debug("Success enabling HA on pool " + Pool.Name()); } catch (Failure f) { if (f.ErrorDescription.Count > 1 && f.ErrorDescription[0] == "VDI_NOT_AVAILABLE") { var vdi = Connection.Resolve(new XenRef<VDI>(f.ErrorDescription[1])); if (vdi != null) throw new Failure(string.Format(FriendlyErrorNames.VDI_NOT_AVAILABLE, vdi.uuid)); } throw; } this.Description = Messages.COMPLETED; } } }
Java
<?php declare(strict_types=1); /* * Studio 107 (c) 2018 Maxim Falaleev * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Mindy\Orm\Tests\Databases\Sqlite; use Mindy\Orm\Tests\QueryBuilder\QueryTest; class SqliteQueryTest extends QueryTest { public $driver = 'sqlite'; }
Java
# frozen_string_literal: true require_relative "../../helpers/file" module Byebug # # Reopens the +info+ command to define the +file+ subcommand # class InfoCommand < Command # # Information about a particular source file # class FileCommand < Command include Helpers::FileHelper include Helpers::StringHelper self.allow_in_post_mortem = true def self.regexp /^\s* f(?:ile)? (?:\s+ (.+))? \s*$/x end def self.description <<-DESCRIPTION inf[o] f[ile] #{short_description} It informs about file name, number of lines, possible breakpoints in the file, last modification time and sha1 digest. DESCRIPTION end def self.short_description "Information about a particular source file." end def execute file = @match[1] || frame.file return errmsg(pr("info.errors.undefined_file", file: file)) unless File.exist?(file) puts prettify <<-RUBY File #{info_file_basic(file)} Breakpoint line numbers: #{info_file_breakpoints(file)} Modification time: #{info_file_mtime(file)} Sha1 Signature: #{info_file_sha1(file)} RUBY end private def info_file_basic(file) path = File.expand_path(file) return unless File.exist?(path) s = n_lines(path) == 1 ? "" : "s" "#{path} (#{n_lines(path)} line#{s})" end def info_file_breakpoints(file) breakpoints = Breakpoint.potential_lines(file) return unless breakpoints breakpoints.to_a.sort.join(" ") end def info_file_mtime(file) File.stat(file).mtime end def info_file_sha1(file) require "digest/sha1" Digest::SHA1.hexdigest(file) end end end end
Java
#include "private.h" #include <Elementary.h> #include "config.h" #include "termio.h" #include "media.h" #include "options.h" #include "options_wallpaper.h" #include "extns.h" #include "media.h" #include "main.h" #include <sys/stat.h> typedef struct _Background_Item { const char *path; Eina_Bool selected; Elm_Object_Item *item; } Background_Item; typedef struct _Insert_Gen_Grid_Item_Notify { Elm_Gengrid_Item_Class *class; Background_Item *item; } Insert_Gen_Grid_Item_Notify; static Eina_Stringshare *_system_path, *_user_path; static Evas_Object *_bg_grid = NULL, *_term = NULL, *_entry = NULL, *_flip = NULL, *_bubble = NULL; static Eina_List *_backgroundlist = NULL; static Ecore_Timer *_bubble_disappear; static Ecore_Thread *_thread; static void _cb_fileselector(void *data EINA_UNUSED, Evas_Object *obj, void* event) { if (event) { elm_object_text_set(_entry, elm_fileselector_path_get(obj)); elm_flip_go_to(_flip, EINA_TRUE, ELM_FLIP_PAGE_LEFT); } else { elm_flip_go_to(_flip, EINA_TRUE, ELM_FLIP_PAGE_LEFT); } } static Eina_Bool _cb_timer_bubble_disappear(void *data EINA_UNUSED) { evas_object_del(_bubble); _bubble_disappear = NULL; return ECORE_CALLBACK_CANCEL; } static void _bubble_show(char *text) { Evas_Object *opbox = elm_object_top_widget_get(_bg_grid); Evas_Object *o; int x = 0, y = 0, w , h; evas_object_geometry_get(_bg_grid, &x, &y, &w ,&h); if (_bubble_disappear) { ecore_timer_del(_bubble_disappear); _cb_timer_bubble_disappear(NULL); } _bubble = elm_bubble_add(opbox); elm_bubble_pos_set(_bubble, ELM_BUBBLE_POS_BOTTOM_RIGHT); evas_object_resize(_bubble, 200, 50); evas_object_move(_bubble, (x + w - 200), (y + h - 50)); evas_object_show(_bubble); o = elm_label_add(_bubble); elm_object_text_set(o, text); elm_object_content_set(_bubble, o); _bubble_disappear = ecore_timer_add(2.0, _cb_timer_bubble_disappear, NULL); } static char * _grid_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) { Background_Item *item = data; const char *s; if (!item->path) return strdup(_("None")); s = ecore_file_file_get(item->path); if (s) return strdup(s); return NULL; } static Evas_Object * _grid_content_get(void *data, Evas_Object *obj, const char *part) { Background_Item *item = data; Evas_Object *o, *oe; Config *config = termio_config_get(_term); char path[PATH_MAX]; if (!strcmp(part, "elm.swallow.icon")) { if (item->path) { int i; Media_Type type; for (i = 0; extn_edj[i]; i++) { if (eina_str_has_extension(item->path, extn_edj[i])) return media_add(obj, item->path, config, MEDIA_BG, MEDIA_TYPE_EDJE); } type = media_src_type_get(item->path); return media_add(obj, item->path, config, MEDIA_THUMB, type); } else { if (!config->theme) return NULL; snprintf(path, PATH_MAX, "%s/themes/%s", elm_app_data_dir_get(), config->theme); o = elm_layout_add(obj); oe = elm_layout_edje_get(o); if (!edje_object_file_set(oe, path, "terminology/background")) { evas_object_del(o); return NULL; } evas_object_show(o); return o; } } return NULL; } static void _item_selected(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) { Background_Item *item = data; Config *config = termio_config_get(_term); if (!config) return; if (!item->path) { // no background eina_stringshare_del(config->background); config->background = NULL; config_save(config, NULL); main_media_update(config); } else if (eina_stringshare_replace(&(config->background), item->path)) { config_save(config, NULL); main_media_update(config); } } static void _insert_gengrid_item(Insert_Gen_Grid_Item_Notify *msg_data) { Insert_Gen_Grid_Item_Notify *insert_msg = msg_data; Config *config = termio_config_get(_term); if (insert_msg && insert_msg->item && insert_msg->class && config) { Background_Item *item = insert_msg->item; Elm_Gengrid_Item_Class *item_class = insert_msg->class; item->item = elm_gengrid_item_append(_bg_grid, item_class, item, _item_selected, item); if ((!item->path) && (!config->background)) { elm_gengrid_item_selected_set(item->item, EINA_TRUE); elm_gengrid_item_bring_in(item->item, ELM_GENGRID_ITEM_SCROLLTO_MIDDLE); } else if ((item->path) && (config->background)) { if (strcmp(item->path, config->background) == 0) { elm_gengrid_item_selected_set(item->item, EINA_TRUE); elm_gengrid_item_bring_in(item->item, ELM_GENGRID_ITEM_SCROLLTO_MIDDLE); } } } free(msg_data); } static Eina_List* _rec_read_directorys(Eina_List *list, const char *root_path, Elm_Gengrid_Item_Class *class) { Eina_List *childs = ecore_file_ls(root_path); char *file_name, path[PATH_MAX]; int i, j; Background_Item *item; const char **extns[5] = { extn_img, extn_scale, extn_edj, extn_mov, NULL }; const char **ex; Insert_Gen_Grid_Item_Notify *notify; if (!childs) return list; EINA_LIST_FREE(childs, file_name) { snprintf(path, PATH_MAX, "%s/%s", root_path, file_name); if ((!ecore_file_is_dir(path)) && (file_name[0] != '.')) { //file is found, search for correct file endings ! for (j = 0; extns[j]; j++) { ex = extns[j]; for (i = 0; ex[i]; i++) { if (eina_str_has_extension(file_name, ex[i])) { //File is found and valid item = calloc(1, sizeof(Background_Item)); if (item) { notify = calloc(1, sizeof(Insert_Gen_Grid_Item_Notify)); item->path = eina_stringshare_add(path); list = eina_list_append(list, item); //insert item to gengrid notify->class = class; notify->item = item; //ecore_thread_feedback(th, notify); _insert_gengrid_item(notify); } break; } } } } free(file_name); } return list; } static void _refresh_directory(const char* data) { Background_Item *item; Elm_Gengrid_Item_Class *item_class; // This will run elm_gengrid_clear elm_gengrid_clear(_bg_grid); if (_backgroundlist) { EINA_LIST_FREE(_backgroundlist, item) { if (item->path) eina_stringshare_del(item->path); free(item); } _backgroundlist = NULL; } item_class = elm_gengrid_item_class_new(); item_class->func.text_get = _grid_text_get; item_class->func.content_get = _grid_content_get; item = calloc(1, sizeof(Background_Item)); _backgroundlist = eina_list_append(_backgroundlist, item); //Insert None Item Insert_Gen_Grid_Item_Notify *notify = calloc(1, sizeof(Insert_Gen_Grid_Item_Notify)); notify->class = item_class; notify->item = item; _insert_gengrid_item(notify); _backgroundlist = _rec_read_directorys(_backgroundlist, data, item_class); elm_gengrid_item_class_free(item_class); _thread = NULL; } static void _gengrid_refresh_samples(const char *path) { if(!ecore_file_exists(path)) return; _refresh_directory(path); } static void _cb_entry_changed(void *data EINA_UNUSED, Evas_Object *parent, void *event EINA_UNUSED) { const char *path = elm_object_text_get(parent); _gengrid_refresh_samples(path); } static void _cb_hoversel_select(void *data, Evas_Object *hoversel EINA_UNUSED, void *event EINA_UNUSED) { Evas_Object *o; char *path = data; if (path) { elm_object_text_set(_entry, path); } else { o = elm_object_part_content_get(_flip, "back"); elm_fileselector_path_set(o, elm_object_text_get(_entry)); elm_flip_go_to(_flip, EINA_FALSE, ELM_FLIP_PAGE_RIGHT); } } static void _system_background_dir_init(void) { char path[PATH_MAX]; snprintf(path, PATH_MAX, "%s/backgrounds/", elm_app_data_dir_get()); if (_system_path) eina_stringshare_replace(&_system_path, path); else _system_path = eina_stringshare_add(path); } static const char* _user_background_dir_init(void){ char path[PATH_MAX], *user; user = getenv("HOME"); if(!user) return NULL; snprintf(path, PATH_MAX, "%s/.config/terminology/background/", user); if (!ecore_file_exists(path)) ecore_file_mkpath(path); if (!_user_path) _user_path = eina_stringshare_add(path); else eina_stringshare_replace(&_user_path, path); return _user_path; } static const char* _import_background(const char* background) { char path[PATH_MAX]; const char *filename = ecore_file_file_get(background); if (!filename) return NULL; if (!_user_background_dir_init()) return NULL; snprintf(path, PATH_MAX, "%s/%s", _user_path, filename); if (!ecore_file_cp(background, path)) return NULL; return eina_stringshare_add(path); } static void _cb_grid_doubleclick(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) { Config *config = termio_config_get(_term); char *config_background_dir = ecore_file_dir_get(config->background); if (!_user_path) { if (!_user_background_dir_init()) return; } if (!config->background) return; if (strncmp(config_background_dir, _user_path, strlen(config_background_dir)) == 0) { _bubble_show(_("Source file is target file")); free(config_background_dir); return; } const char *newfile = _import_background(config->background); if (newfile) { eina_stringshare_replace(&(config->background), newfile); config_save(config, NULL); main_media_update(config); eina_stringshare_del(newfile); _bubble_show(_("Picture imported")); elm_object_text_set(_entry, config_background_dir); } else { _bubble_show(_("Failed")); } free(config_background_dir); } void options_wallpaper(Evas_Object *opbox, Evas_Object *term) { Evas_Object *frame, *o, *bx, *bx2; Config *config = termio_config_get(term); char path[PATH_MAX], *config_background_dir; _term = term; frame = o = elm_frame_add(opbox); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_object_text_set(o, _("Background")); evas_object_show(o); elm_box_pack_end(opbox, o); _flip = o = elm_flip_add(opbox); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_object_content_set(frame, o); evas_object_show(o); o = elm_fileselector_add(opbox); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_object_part_content_set(_flip, "back", o); elm_fileselector_folder_only_set(o, EINA_TRUE); evas_object_smart_callback_add(o, "done", _cb_fileselector, NULL); evas_object_show(o); bx = o = elm_box_add(opbox); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_object_part_content_set(_flip, "front", bx); evas_object_show(o); bx2 = o = elm_box_add(opbox); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0); elm_box_horizontal_set(o, EINA_TRUE); elm_box_pack_start(bx, o); evas_object_show(o); _entry = o = elm_entry_add(opbox); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0); elm_entry_single_line_set(o, EINA_TRUE); elm_entry_scrollable_set(o, EINA_TRUE); elm_scroller_policy_set(o, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); evas_object_smart_callback_add(_entry, "changed", _cb_entry_changed, NULL); elm_box_pack_start(bx2, o); evas_object_show(o); o = elm_hoversel_add(opbox); evas_object_size_hint_weight_set(o, 0.0, 0.0); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0); elm_object_text_set(o, _("Select Path")); elm_box_pack_end(bx2, o); evas_object_show(o); snprintf(path, PATH_MAX, "%s/backgrounds/", elm_app_data_dir_get()); _system_background_dir_init(); elm_hoversel_item_add(o, _("System"), NULL, ELM_ICON_NONE, _cb_hoversel_select , _system_path); if (_user_background_dir_init()) elm_hoversel_item_add(o, _("User"), NULL, ELM_ICON_NONE, _cb_hoversel_select , _user_path); //In the other case it has failed, so dont show the user item elm_hoversel_item_add(o, _("Other"), NULL, ELM_ICON_NONE, _cb_hoversel_select , NULL); _bg_grid = o = elm_gengrid_add(opbox); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_smart_callback_add(o, "clicked,double", _cb_grid_doubleclick, NULL); elm_gengrid_item_size_set(o, elm_config_scale_get() * 100, elm_config_scale_get() * 80); elm_box_pack_end(bx, o); evas_object_show(o); o = elm_label_add(opbox); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0); elm_object_text_set(o, _("Double click on a picture to import it")); elm_box_pack_end(bx, o); evas_object_show(o); if (config->background) { config_background_dir = ecore_file_dir_get(config->background); elm_object_text_set(_entry, config_background_dir); free(config_background_dir); } else { elm_object_text_set(_entry, _system_path); } } void options_wallpaper_clear(void) { Background_Item *item; EINA_LIST_FREE(_backgroundlist, item) { if (item->path) eina_stringshare_del(item->path); free(item); } _backgroundlist = NULL; if (_user_path) { eina_stringshare_del(_user_path); _user_path = NULL; } if (_system_path) { eina_stringshare_del(_system_path); _system_path = NULL; } }
Java
/* * Copyright (C) 2011 Google Inc. All rights reserved. * Copyright (C) Research In Motion Limited 2011. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "config.h" #if ENABLE(WEB_SOCKETS) #include "WebSocketHandshake.h" #include "Base64.h" #include "Cookie.h" #include "CookieJar.h" #include "Document.h" #include "HTTPHeaderMap.h" #include "KURL.h" #include "Logging.h" #include "ScriptCallStack.h" #include "ScriptExecutionContext.h" #include "SecurityOrigin.h" #include <wtf/CryptographicallyRandomNumber.h> #include <wtf/MD5.h> #include <wtf/SHA1.h> #include <wtf/StdLibExtras.h> #include <wtf/StringExtras.h> #include <wtf/Vector.h> #include <wtf/text/CString.h> #include <wtf/text/StringBuilder.h> #include <wtf/text/WTFString.h> #include <wtf/unicode/CharacterNames.h> namespace WebCore { static const char randomCharacterInSecWebSocketKey[] = "!\"#$%&'()*+,-./:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; static String resourceName(const KURL& url) { String name = url.path(); if (name.isEmpty()) name = "/"; if (!url.query().isNull()) name += "?" + url.query(); ASSERT(!name.isEmpty()); ASSERT(!name.contains(' ')); return name; } static String hostName(const KURL& url, bool secure) { ASSERT(url.protocolIs("wss") == secure); StringBuilder builder; builder.append(url.host().lower()); if (url.port() && ((!secure && url.port() != 80) || (secure && url.port() != 443))) { builder.append(':'); builder.append(String::number(url.port())); } return builder.toString(); } static const size_t maxConsoleMessageSize = 128; static String trimConsoleMessage(const char* p, size_t len) { String s = String(p, std::min<size_t>(len, maxConsoleMessageSize)); if (len > maxConsoleMessageSize) s.append(horizontalEllipsis); return s; } static uint32_t randomNumberLessThan(uint32_t n) { if (!n) return 0; if (n == std::numeric_limits<uint32_t>::max()) return cryptographicallyRandomNumber(); uint32_t max = std::numeric_limits<uint32_t>::max() - (std::numeric_limits<uint32_t>::max() % n); ASSERT(!(max % n)); uint32_t v; do { v = cryptographicallyRandomNumber(); } while (v >= max); return v % n; } static void generateHixie76SecWebSocketKey(uint32_t& number, String& key) { uint32_t space = randomNumberLessThan(12) + 1; uint32_t max = 4294967295U / space; number = randomNumberLessThan(max); uint32_t product = number * space; String s = String::number(product); int n = randomNumberLessThan(12) + 1; DEFINE_STATIC_LOCAL(String, randomChars, (randomCharacterInSecWebSocketKey)); for (int i = 0; i < n; i++) { int pos = randomNumberLessThan(s.length() + 1); int chpos = randomNumberLessThan(randomChars.length()); s.insert(randomChars.substring(chpos, 1), pos); } DEFINE_STATIC_LOCAL(String, spaceChar, (" ")); for (uint32_t i = 0; i < space; i++) { int pos = randomNumberLessThan(s.length() - 1) + 1; s.insert(spaceChar, pos); } ASSERT(s[0] != ' '); ASSERT(s[s.length() - 1] != ' '); key = s; } static void generateHixie76Key3(unsigned char key3[8]) { cryptographicallyRandomValues(key3, 8); } static void setChallengeNumber(unsigned char* buf, uint32_t number) { unsigned char* p = buf + 3; for (int i = 0; i < 4; i++) { *p = number & 0xFF; --p; number >>= 8; } } static void generateHixie76ExpectedChallengeResponse(uint32_t number1, uint32_t number2, unsigned char key3[8], unsigned char expectedChallenge[16]) { unsigned char challenge[16]; setChallengeNumber(&challenge[0], number1); setChallengeNumber(&challenge[4], number2); memcpy(&challenge[8], key3, 8); MD5 md5; md5.addBytes(challenge, sizeof(challenge)); Vector<uint8_t, 16> digest; md5.checksum(digest); memcpy(expectedChallenge, digest.data(), 16); } static String generateSecWebSocketKey() { static const size_t nonceSize = 16; unsigned char key[nonceSize]; cryptographicallyRandomValues(key, nonceSize); return base64Encode(reinterpret_cast<char*>(key), nonceSize); } static String getExpectedWebSocketAccept(const String& secWebSocketKey) { static const char* const webSocketKeyGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; static const size_t sha1HashSize = 20; // FIXME: This should be defined in SHA1.h. SHA1 sha1; CString keyData = secWebSocketKey.ascii(); sha1.addBytes(reinterpret_cast<const uint8_t*>(keyData.data()), keyData.length()); sha1.addBytes(reinterpret_cast<const uint8_t*>(webSocketKeyGUID), strlen(webSocketKeyGUID)); Vector<uint8_t, sha1HashSize> hash; sha1.computeHash(hash); return base64Encode(reinterpret_cast<const char*>(hash.data()), sha1HashSize); } WebSocketHandshake::WebSocketHandshake(const KURL& url, const String& protocol, ScriptExecutionContext* context, bool useHixie76Protocol) : m_url(url) , m_clientProtocol(protocol) , m_secure(m_url.protocolIs("wss")) , m_context(context) , m_useHixie76Protocol(useHixie76Protocol) , m_mode(Incomplete) { if (m_useHixie76Protocol) { uint32_t number1; uint32_t number2; generateHixie76SecWebSocketKey(number1, m_hixie76SecWebSocketKey1); generateHixie76SecWebSocketKey(number2, m_hixie76SecWebSocketKey2); generateHixie76Key3(m_hixie76Key3); generateHixie76ExpectedChallengeResponse(number1, number2, m_hixie76Key3, m_hixie76ExpectedChallengeResponse); } else { m_secWebSocketKey = generateSecWebSocketKey(); m_expectedAccept = getExpectedWebSocketAccept(m_secWebSocketKey); } } WebSocketHandshake::~WebSocketHandshake() { } const KURL& WebSocketHandshake::url() const { return m_url; } void WebSocketHandshake::setURL(const KURL& url) { m_url = url.copy(); } const String WebSocketHandshake::host() const { return m_url.host().lower(); } const String& WebSocketHandshake::clientProtocol() const { return m_clientProtocol; } void WebSocketHandshake::setClientProtocol(const String& protocol) { m_clientProtocol = protocol; } bool WebSocketHandshake::secure() const { return m_secure; } String WebSocketHandshake::clientOrigin() const { return m_context->securityOrigin()->toString(); } String WebSocketHandshake::clientLocation() const { StringBuilder builder; builder.append(m_secure ? "wss" : "ws"); builder.append("://"); builder.append(hostName(m_url, m_secure)); builder.append(resourceName(m_url)); return builder.toString(); } CString WebSocketHandshake::clientHandshakeMessage() const { // Keep the following consistent with clientHandshakeRequest(). StringBuilder builder; builder.append("GET "); builder.append(resourceName(m_url)); builder.append(" HTTP/1.1\r\n"); Vector<String> fields; if (m_useHixie76Protocol) fields.append("Upgrade: WebSocket"); else fields.append("Upgrade: websocket"); fields.append("Connection: Upgrade"); fields.append("Host: " + hostName(m_url, m_secure)); if (m_useHixie76Protocol) fields.append("Origin: " + clientOrigin()); else fields.append("Sec-WebSocket-Origin: " + clientOrigin()); if (!m_clientProtocol.isEmpty()) fields.append("Sec-WebSocket-Protocol: " + m_clientProtocol); KURL url = httpURLForAuthenticationAndCookies(); if (m_context->isDocument()) { Document* document = static_cast<Document*>(m_context); String cookie = cookieRequestHeaderFieldValue(document, url); if (!cookie.isEmpty()) fields.append("Cookie: " + cookie); // Set "Cookie2: <cookie>" if cookies 2 exists for url? } if (m_useHixie76Protocol) { fields.append("Sec-WebSocket-Key1: " + m_hixie76SecWebSocketKey1); fields.append("Sec-WebSocket-Key2: " + m_hixie76SecWebSocketKey2); } else { fields.append("Sec-WebSocket-Key: " + m_secWebSocketKey); fields.append("Sec-WebSocket-Version: 8"); } // Fields in the handshake are sent by the client in a random order; the // order is not meaningful. Thus, it's ok to send the order we constructed // the fields. for (size_t i = 0; i < fields.size(); i++) { builder.append(fields[i]); builder.append("\r\n"); } builder.append("\r\n"); CString handshakeHeader = builder.toString().utf8(); // Hybi-10 handshake is complete at this point. if (!m_useHixie76Protocol) return handshakeHeader; // Hixie-76 protocol requires sending eight-byte data (so-called "key3") after the request header fields. char* characterBuffer = 0; CString msg = CString::newUninitialized(handshakeHeader.length() + sizeof(m_hixie76Key3), characterBuffer); memcpy(characterBuffer, handshakeHeader.data(), handshakeHeader.length()); memcpy(characterBuffer + handshakeHeader.length(), m_hixie76Key3, sizeof(m_hixie76Key3)); return msg; } WebSocketHandshakeRequest WebSocketHandshake::clientHandshakeRequest() const { // Keep the following consistent with clientHandshakeMessage(). // FIXME: do we need to store m_secWebSocketKey1, m_secWebSocketKey2 and // m_key3 in WebSocketHandshakeRequest? WebSocketHandshakeRequest request("GET", m_url); if (m_useHixie76Protocol) request.addHeaderField("Upgrade", "WebSocket"); else request.addHeaderField("Upgrade", "websocket"); request.addHeaderField("Connection", "Upgrade"); request.addHeaderField("Host", hostName(m_url, m_secure)); if (m_useHixie76Protocol) request.addHeaderField("Origin", clientOrigin()); else request.addHeaderField("Sec-WebSocket-Origin", clientOrigin()); if (!m_clientProtocol.isEmpty()) request.addHeaderField("Sec-WebSocket-Protocol:", m_clientProtocol); KURL url = httpURLForAuthenticationAndCookies(); if (m_context->isDocument()) { Document* document = static_cast<Document*>(m_context); String cookie = cookieRequestHeaderFieldValue(document, url); if (!cookie.isEmpty()) request.addHeaderField("Cookie", cookie); // Set "Cookie2: <cookie>" if cookies 2 exists for url? } if (m_useHixie76Protocol) { request.addHeaderField("Sec-WebSocket-Key1", m_hixie76SecWebSocketKey1); request.addHeaderField("Sec-WebSocket-Key2", m_hixie76SecWebSocketKey2); request.setKey3(m_hixie76Key3); } else { request.addHeaderField("Sec-WebSocket-Key", m_secWebSocketKey); request.addHeaderField("Sec-WebSocket-Version", "8"); } return request; } void WebSocketHandshake::reset() { m_mode = Incomplete; } void WebSocketHandshake::clearScriptExecutionContext() { m_context = 0; } int WebSocketHandshake::readServerHandshake(const char* header, size_t len) { m_mode = Incomplete; int statusCode; String statusText; int lineLength = readStatusLine(header, len, statusCode, statusText); if (lineLength == -1) return -1; if (statusCode == -1) { m_mode = Failed; // m_failureReason is set inside readStatusLine(). return len; } LOG(Network, "response code: %d", statusCode); m_response.setStatusCode(statusCode); m_response.setStatusText(statusText); if (statusCode != 101) { m_mode = Failed; m_failureReason = "Unexpected response code: " + String::number(statusCode); return len; } m_mode = Normal; if (!strnstr(header, "\r\n\r\n", len)) { // Just hasn't been received fully yet. m_mode = Incomplete; return -1; } const char* p = readHTTPHeaders(header + lineLength, header + len); if (!p) { LOG(Network, "readHTTPHeaders failed"); m_mode = Failed; // m_failureReason is set inside readHTTPHeaders(). return len; } if (!checkResponseHeaders()) { LOG(Network, "header process failed"); m_mode = Failed; return p - header; } if (!m_useHixie76Protocol) { // Hybi-10 handshake is complete at this point. m_mode = Connected; return p - header; } // In hixie-76 protocol, server's handshake contains sixteen-byte data (called "challenge response") // after the header fields. if (len < static_cast<size_t>(p - header + sizeof(m_hixie76ExpectedChallengeResponse))) { // Just hasn't been received /expected/ yet. m_mode = Incomplete; return -1; } m_response.setChallengeResponse(static_cast<const unsigned char*>(static_cast<const void*>(p))); if (memcmp(p, m_hixie76ExpectedChallengeResponse, sizeof(m_hixie76ExpectedChallengeResponse))) { m_mode = Failed; return (p - header) + sizeof(m_hixie76ExpectedChallengeResponse); } m_mode = Connected; return (p - header) + sizeof(m_hixie76ExpectedChallengeResponse); } WebSocketHandshake::Mode WebSocketHandshake::mode() const { return m_mode; } String WebSocketHandshake::failureReason() const { return m_failureReason; } String WebSocketHandshake::serverWebSocketOrigin() const { return m_response.headerFields().get("sec-websocket-origin"); } String WebSocketHandshake::serverWebSocketLocation() const { return m_response.headerFields().get("sec-websocket-location"); } String WebSocketHandshake::serverWebSocketProtocol() const { return m_response.headerFields().get("sec-websocket-protocol"); } String WebSocketHandshake::serverSetCookie() const { return m_response.headerFields().get("set-cookie"); } String WebSocketHandshake::serverSetCookie2() const { return m_response.headerFields().get("set-cookie2"); } String WebSocketHandshake::serverUpgrade() const { return m_response.headerFields().get("upgrade"); } String WebSocketHandshake::serverConnection() const { return m_response.headerFields().get("connection"); } String WebSocketHandshake::serverWebSocketAccept() const { return m_response.headerFields().get("sec-websocket-accept"); } String WebSocketHandshake::serverWebSocketExtensions() const { return m_response.headerFields().get("sec-websocket-extensions"); } const WebSocketHandshakeResponse& WebSocketHandshake::serverHandshakeResponse() const { return m_response; } KURL WebSocketHandshake::httpURLForAuthenticationAndCookies() const { KURL url = m_url.copy(); bool couldSetProtocol = url.setProtocol(m_secure ? "https" : "http"); ASSERT_UNUSED(couldSetProtocol, couldSetProtocol); return url; } // Returns the header length (including "\r\n"), or -1 if we have not received enough data yet. // If the line is malformed or the status code is not a 3-digit number, // statusCode and statusText will be set to -1 and a null string, respectively. int WebSocketHandshake::readStatusLine(const char* header, size_t headerLength, int& statusCode, String& statusText) { // Arbitrary size limit to prevent the server from sending an unbounded // amount of data with no newlines and forcing us to buffer it all. static const int maximumLength = 1024; statusCode = -1; statusText = String(); const char* space1 = 0; const char* space2 = 0; const char* p; size_t consumedLength; for (p = header, consumedLength = 0; consumedLength < headerLength; p++, consumedLength++) { if (*p == ' ') { if (!space1) space1 = p; else if (!space2) space2 = p; } else if (*p == '\0') { // The caller isn't prepared to deal with null bytes in status // line. WebSockets specification doesn't prohibit this, but HTTP // does, so we'll just treat this as an error. m_failureReason = "Status line contains embedded null"; return p + 1 - header; } else if (*p == '\n') break; } if (consumedLength == headerLength) return -1; // We have not received '\n' yet. const char* end = p + 1; int lineLength = end - header; if (lineLength > maximumLength) { m_failureReason = "Status line is too long"; return maximumLength; } // The line must end with "\r\n". if (lineLength < 2 || *(end - 2) != '\r') { m_failureReason = "Status line does not end with CRLF"; return lineLength; } if (!space1 || !space2) { m_failureReason = "No response code found: " + trimConsoleMessage(header, lineLength - 2); return lineLength; } String statusCodeString(space1 + 1, space2 - space1 - 1); if (statusCodeString.length() != 3) // Status code must consist of three digits. return lineLength; for (int i = 0; i < 3; ++i) if (statusCodeString[i] < '0' || statusCodeString[i] > '9') { m_failureReason = "Invalid status code: " + statusCodeString; return lineLength; } bool ok = false; statusCode = statusCodeString.toInt(&ok); ASSERT(ok); statusText = String(space2 + 1, end - space2 - 3); // Exclude "\r\n". return lineLength; } const char* WebSocketHandshake::readHTTPHeaders(const char* start, const char* end) { m_response.clearHeaderFields(); Vector<char> name; Vector<char> value; for (const char* p = start; p < end; p++) { name.clear(); value.clear(); for (; p < end; p++) { switch (*p) { case '\r': if (name.isEmpty()) { if (p + 1 < end && *(p + 1) == '\n') return p + 2; m_failureReason = "CR doesn't follow LF at " + trimConsoleMessage(p, end - p); return 0; } m_failureReason = "Unexpected CR in name at " + trimConsoleMessage(name.data(), name.size()); return 0; case '\n': m_failureReason = "Unexpected LF in name at " + trimConsoleMessage(name.data(), name.size()); return 0; case ':': break; default: name.append(*p); continue; } if (*p == ':') { ++p; break; } } for (; p < end && *p == 0x20; p++) { } for (; p < end; p++) { switch (*p) { case '\r': break; case '\n': m_failureReason = "Unexpected LF in value at " + trimConsoleMessage(value.data(), value.size()); return 0; default: value.append(*p); } if (*p == '\r') { ++p; break; } } if (p >= end || *p != '\n') { m_failureReason = "CR doesn't follow LF after value at " + trimConsoleMessage(p, end - p); return 0; } AtomicString nameStr = AtomicString::fromUTF8(name.data(), name.size()); String valueStr = String::fromUTF8(value.data(), value.size()); if (nameStr.isNull()) { m_failureReason = "Invalid UTF-8 sequence in header name"; return 0; } if (valueStr.isNull()) { m_failureReason = "Invalid UTF-8 sequence in header value"; return 0; } LOG(Network, "name=%s value=%s", nameStr.string().utf8().data(), valueStr.utf8().data()); m_response.addHeaderField(nameStr, valueStr); } ASSERT_NOT_REACHED(); return 0; } bool WebSocketHandshake::checkResponseHeaders() { const String& serverWebSocketLocation = this->serverWebSocketLocation(); const String& serverWebSocketOrigin = this->serverWebSocketOrigin(); const String& serverWebSocketProtocol = this->serverWebSocketProtocol(); const String& serverUpgrade = this->serverUpgrade(); const String& serverConnection = this->serverConnection(); const String& serverWebSocketAccept = this->serverWebSocketAccept(); const String& serverWebSocketExtensions = this->serverWebSocketExtensions(); if (serverUpgrade.isNull()) { m_failureReason = "Error during WebSocket handshake: 'Upgrade' header is missing"; return false; } if (serverConnection.isNull()) { m_failureReason = "Error during WebSocket handshake: 'Connection' header is missing"; return false; } if (m_useHixie76Protocol) { if (serverWebSocketOrigin.isNull()) { m_failureReason = "Error during WebSocket handshake: 'Sec-WebSocket-Origin' header is missing"; return false; } if (serverWebSocketLocation.isNull()) { m_failureReason = "Error during WebSocket handshake: 'Sec-WebSocket-Location' header is missing"; return false; } } else { if (serverWebSocketAccept.isNull()) { m_failureReason = "Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing"; return false; } } if (!equalIgnoringCase(serverUpgrade, "websocket")) { m_failureReason = "Error during WebSocket handshake: 'Upgrade' header value is not 'WebSocket'"; return false; } if (!equalIgnoringCase(serverConnection, "upgrade")) { m_failureReason = "Error during WebSocket handshake: 'Connection' header value is not 'Upgrade'"; return false; } if (m_useHixie76Protocol) { if (clientOrigin() != serverWebSocketOrigin) { m_failureReason = "Error during WebSocket handshake: origin mismatch: " + clientOrigin() + " != " + serverWebSocketOrigin; return false; } if (clientLocation() != serverWebSocketLocation) { m_failureReason = "Error during WebSocket handshake: location mismatch: " + clientLocation() + " != " + serverWebSocketLocation; return false; } if (!m_clientProtocol.isEmpty() && m_clientProtocol != serverWebSocketProtocol) { m_failureReason = "Error during WebSocket handshake: protocol mismatch: " + m_clientProtocol + " != " + serverWebSocketProtocol; return false; } } else { if (serverWebSocketAccept != m_expectedAccept) { m_failureReason = "Error during WebSocket handshake: Sec-WebSocket-Accept mismatch"; return false; } if (!serverWebSocketExtensions.isNull()) { // WebSocket protocol extensions are not supported yet. // We do not send Sec-WebSocket-Extensions header in our request, thus // servers should not return this header, either. m_failureReason = "Error during WebSocket handshake: Sec-WebSocket-Extensions header is invalid"; return false; } } return true; } } // namespace WebCore #endif // ENABLE(WEB_SOCKETS)
Java
/************************************************************************* * * * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * * All rights reserved. Email: [email protected] Web: www.q12.org * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of EITHER: * * (1) The GNU Lesser General Public License as published by the Free * * Software Foundation; either version 2.1 of the License, or (at * * your option) any later version. The text of the GNU Lesser * * General Public License is included with this library in the * * file LICENSE.TXT. * * (2) The BSD-style license that is included with this library in * * the file LICENSE-BSD.TXT. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * * LICENSE.TXT and LICENSE-BSD.TXT for more details. * * * *************************************************************************/ /* optimized and unoptimized vector and matrix functions */ #ifndef _ODE_MATRIX_H_ #define _ODE_MATRIX_H_ #include "common.h" #ifdef __cplusplus extern "C" { #endif /* set a vector/matrix of size n to all zeros, or to a specific value. */ ODE_API void dSetZero (dReal *a, int n); ODE_API void dSetValue (dReal *a, int n, dReal value); /* get the dot product of two n*1 vectors. if n <= 0 then * zero will be returned (in which case a and b need not be valid). */ ODE_API dReal dDot (const dReal *a, const dReal *b, int n); /* get the dot products of (a0,b), (a1,b), etc and return them in outsum. * all vectors are n*1. if n <= 0 then zeroes will be returned (in which case * the input vectors need not be valid). this function is somewhat faster * than calling dDot() for all of the combinations separately. */ /* NOT INCLUDED in the library for now. void dMultidot2 (const dReal *a0, const dReal *a1, const dReal *b, dReal *outsum, int n); */ /* matrix multiplication. all matrices are stored in standard row format. * the digit refers to the argument that is transposed: * 0: A = B * C (sizes: A:p*r B:p*q C:q*r) * 1: A = B' * C (sizes: A:p*r B:q*p C:q*r) * 2: A = B * C' (sizes: A:p*r B:p*q C:r*q) * case 1,2 are equivalent to saying that the operation is A=B*C but * B or C are stored in standard column format. */ ODE_API void dMultiply0 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); ODE_API void dMultiply1 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); ODE_API void dMultiply2 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); /* do an in-place cholesky decomposition on the lower triangle of the n*n * symmetric matrix A (which is stored by rows). the resulting lower triangle * will be such that L*L'=A. return 1 on success and 0 on failure (on failure * the matrix is not positive definite). */ ODE_API int dFactorCholesky (dReal *A, int n); /* solve for x: L*L'*x = b, and put the result back into x. * L is size n*n, b is size n*1. only the lower triangle of L is considered. */ ODE_API void dSolveCholesky (const dReal *L, dReal *b, int n); /* compute the inverse of the n*n positive definite matrix A and put it in * Ainv. this is not especially fast. this returns 1 on success (A was * positive definite) or 0 on failure (not PD). */ ODE_API int dInvertPDMatrix (const dReal *A, dReal *Ainv, int n); /* check whether an n*n matrix A is positive definite, return 1/0 (yes/no). * positive definite means that x'*A*x > 0 for any x. this performs a * cholesky decomposition of A. if the decomposition fails then the matrix * is not positive definite. A is stored by rows. A is not altered. */ ODE_API int dIsPositiveDefinite (const dReal *A, int n); /* factorize a matrix A into L*D*L', where L is lower triangular with ones on * the diagonal, and D is diagonal. * A is an n*n matrix stored by rows, with a leading dimension of n rounded * up to 4. L is written into the strict lower triangle of A (the ones are not * written) and the reciprocal of the diagonal elements of D are written into * d. */ ODE_API void dFactorLDLT (dReal *A, dReal *d, int n, int nskip); /* solve L*x=b, where L is n*n lower triangular with ones on the diagonal, * and x,b are n*1. b is overwritten with x. * the leading dimension of L is `nskip'. */ ODE_API void dSolveL1 (const dReal *L, dReal *b, int n, int nskip); /* solve L'*x=b, where L is n*n lower triangular with ones on the diagonal, * and x,b are n*1. b is overwritten with x. * the leading dimension of L is `nskip'. */ ODE_API void dSolveL1T (const dReal *L, dReal *b, int n, int nskip); /* in matlab syntax: a(1:n) = a(1:n) .* d(1:n) */ ODE_API void dVectorScale (dReal *a, const dReal *d, int n); /* given `L', a n*n lower triangular matrix with ones on the diagonal, * and `d', a n*1 vector of the reciprocal diagonal elements of an n*n matrix * D, solve L*D*L'*x=b where x,b are n*1. x overwrites b. * the leading dimension of L is `nskip'. */ ODE_API void dSolveLDLT (const dReal *L, const dReal *d, dReal *b, int n, int nskip); /* given an L*D*L' factorization of an n*n matrix A, return the updated * factorization L2*D2*L2' of A plus the following "top left" matrix: * * [ b a' ] <-- b is a[0] * [ a 0 ] <-- a is a[1..n-1] * * - L has size n*n, its leading dimension is nskip. L is lower triangular * with ones on the diagonal. only the lower triangle of L is referenced. * - d has size n. d contains the reciprocal diagonal elements of D. * - a has size n. * the result is written into L, except that the left column of L and d[0] * are not actually modified. see ldltaddTL.m for further comments. */ ODE_API void dLDLTAddTL (dReal *L, dReal *d, const dReal *a, int n, int nskip); /* given an L*D*L' factorization of a permuted matrix A, produce a new * factorization for row and column `r' removed. * - A has size n1*n1, its leading dimension in nskip. A is symmetric and * positive definite. only the lower triangle of A is referenced. * A itself may actually be an array of row pointers. * - L has size n2*n2, its leading dimension in nskip. L is lower triangular * with ones on the diagonal. only the lower triangle of L is referenced. * - d has size n2. d contains the reciprocal diagonal elements of D. * - p is a permutation vector. it contains n2 indexes into A. each index * must be in the range 0..n1-1. * - r is the row/column of L to remove. * the new L will be written within the old L, i.e. will have the same leading * dimension. the last row and column of L, and the last element of d, are * undefined on exit. * * a fast O(n^2) algorithm is used. see ldltremove.m for further comments. */ ODE_API void dLDLTRemove (dReal **A, const int *p, dReal *L, dReal *d, int n1, int n2, int r, int nskip); /* given an n*n matrix A (with leading dimension nskip), remove the r'th row * and column by moving elements. the new matrix will have the same leading * dimension. the last row and column of A are untouched on exit. */ ODE_API void dRemoveRowCol (dReal *A, int n, int nskip, int r); //#if defined(__ODE__) void _dSetZero (dReal *a, size_t n); void _dSetValue (dReal *a, size_t n, dReal value); dReal _dDot (const dReal *a, const dReal *b, int n); void _dMultiply0 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); void _dMultiply1 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); void _dMultiply2 (dReal *A, const dReal *B, const dReal *C, int p,int q,int r); int _dFactorCholesky (dReal *A, int n, void *tmpbuf); void _dSolveCholesky (const dReal *L, dReal *b, int n, void *tmpbuf); int _dInvertPDMatrix (const dReal *A, dReal *Ainv, int n, void *tmpbuf); int _dIsPositiveDefinite (const dReal *A, int n, void *tmpbuf); void _dFactorLDLT (dReal *A, dReal *d, int n, int nskip); void _dSolveL1 (const dReal *L, dReal *b, int n, int nskip); void _dSolveL1T (const dReal *L, dReal *b, int n, int nskip); void _dVectorScale (dReal *a, const dReal *d, int n); void _dSolveLDLT (const dReal *L, const dReal *d, dReal *b, int n, int nskip); void _dLDLTAddTL (dReal *L, dReal *d, const dReal *a, int n, int nskip, void *tmpbuf); void _dLDLTRemove (dReal **A, const int *p, dReal *L, dReal *d, int n1, int n2, int r, int nskip, void *tmpbuf); void _dRemoveRowCol (dReal *A, int n, int nskip, int r); PURE_INLINE size_t _dEstimateFactorCholeskyTmpbufSize(int n) { return dPAD(n) * sizeof(dReal); } PURE_INLINE size_t _dEstimateSolveCholeskyTmpbufSize(int n) { return dPAD(n) * sizeof(dReal); } PURE_INLINE size_t _dEstimateInvertPDMatrixTmpbufSize(int n) { size_t FactorCholesky_size = _dEstimateFactorCholeskyTmpbufSize(n); size_t SolveCholesky_size = _dEstimateSolveCholeskyTmpbufSize(n); size_t MaxCholesky_size = FactorCholesky_size > SolveCholesky_size ? FactorCholesky_size : SolveCholesky_size; return dPAD(n) * (n + 1) * sizeof(dReal) + MaxCholesky_size; } PURE_INLINE size_t _dEstimateIsPositiveDefiniteTmpbufSize(int n) { return dPAD(n) * n * sizeof(dReal) + _dEstimateFactorCholeskyTmpbufSize(n); } PURE_INLINE size_t _dEstimateLDLTAddTLTmpbufSize(int nskip) { return nskip * 2 * sizeof(dReal); } PURE_INLINE size_t _dEstimateLDLTRemoveTmpbufSize(int n2, int nskip) { return n2 * sizeof(dReal) + _dEstimateLDLTAddTLTmpbufSize(nskip); } // For internal use #define dSetZero(a, n) _dSetZero(a, n) #define dSetValue(a, n, value) _dSetValue(a, n, value) #define dDot(a, b, n) _dDot(a, b, n) #define dMultiply0(A, B, C, p, q, r) _dMultiply0(A, B, C, p, q, r) #define dMultiply1(A, B, C, p, q, r) _dMultiply1(A, B, C, p, q, r) #define dMultiply2(A, B, C, p, q, r) _dMultiply2(A, B, C, p, q, r) #define dFactorCholesky(A, n, tmpbuf) _dFactorCholesky(A, n, tmpbuf) #define dSolveCholesky(L, b, n, tmpbuf) _dSolveCholesky(L, b, n, tmpbuf) #define dInvertPDMatrix(A, Ainv, n, tmpbuf) _dInvertPDMatrix(A, Ainv, n, tmpbuf) #define dIsPositiveDefinite(A, n, tmpbuf) _dIsPositiveDefinite(A, n, tmpbuf) #define dFactorLDLT(A, d, n, nskip) _dFactorLDLT(A, d, n, nskip) #define dSolveL1(L, b, n, nskip) _dSolveL1(L, b, n, nskip) #define dSolveL1T(L, b, n, nskip) _dSolveL1T(L, b, n, nskip) #define dVectorScale(a, d, n) _dVectorScale(a, d, n) #define dSolveLDLT(L, d, b, n, nskip) _dSolveLDLT(L, d, b, n, nskip) #define dLDLTAddTL(L, d, a, n, nskip, tmpbuf) _dLDLTAddTL(L, d, a, n, nskip, tmpbuf) #define dLDLTRemove(A, p, L, d, n1, n2, r, nskip, tmpbuf) _dLDLTRemove(A, p, L, d, n1, n2, r, nskip, tmpbuf) #define dRemoveRowCol(A, n, nskip, r) _dRemoveRowCol(A, n, nskip, r) #define dEstimateFactorCholeskyTmpbufSize(n) _dEstimateFactorCholeskyTmpbufSize(n) #define dEstimateSolveCholeskyTmpbufSize(n) _dEstimateSolveCholeskyTmpbufSize(n) #define dEstimateInvertPDMatrixTmpbufSize(n) _dEstimateInvertPDMatrixTmpbufSize(n) #define dEstimateIsPositiveDefiniteTmpbufSize(n) _dEstimateIsPositiveDefiniteTmpbufSize(n) #define dEstimateLDLTAddTLTmpbufSize(nskip) _dEstimateLDLTAddTLTmpbufSize(nskip) #define dEstimateLDLTRemoveTmpbufSize(n2, nskip) _dEstimateLDLTRemoveTmpbufSize(n2, nskip) //#endif // defined(__ODE__) #ifdef __cplusplus } #endif #endif
Java
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Connoisseur</title> <link href="styles/style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="container"> <header> <nav> <ul id="nav"> <li><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> <li><a href="menu.html">Menu</a></li> <li><a href="gallery.html">Gallery</a></li> <li><a href="reviews.html" class="current">Reviews</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <div class="wrapper"> <div class="border"></div> <article> <h3>Reviews</h3> <blockquote>Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.<span>~Lorem</span></blockquote> <div class="border3"></div> <blockquote>Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.<span>~Lorem</span></blockquote> <div class="border3"></div> <blockquote>Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.<span>~Lorem</span></blockquote> <div class="border3"></div> <blockquote>Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.<span>~Lorem</span></blockquote> <div class="border3"></div> </article> <aside class="sidebar"> <h3>Sidebar Widget</h3> <img src="images/home/1.jpg" width="280" alt="" /> <p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. In turpis pulvinar facilisis. Ut felis.<br> <a href="" class="right" style="padding-top:7px"><strong>Continue Reading &raquo;</strong></a></p> </aside> <div class="border2"></div> <br> </div> <footer> <div class="border"></div> <div class="footer-widget"> <h4>Some Title</h4> <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. </p> </div> <div class="footer-widget"> <h4>From The Blog</h4> <ul class="blog"> <li><a href="#">Lorem Ipsum Dolor</a><br/> Orciint erdum condimen terdum nulla mcorper elit nam curabitur... </li> <li><a href="#">Praesent Et Eros</a><br/> Orciint erdum condimen terdum nulla mcorper elit nam curabitur... </li> <li><a href="#">Suspendisse In Neque</a><br/> Orciint erdum condimen terdum nulla mcorper elit nam curabitur... </li> <li><a href="#">Suspendisse In Neque</a><br/> Orciint erdum condimen terdum nulla mcorper elit nam curabitur... </li> </ul> </div> <div class="footer-widget"> <h4>We Are Social!</h4> <div id="social"> <a href="http://twitter.com/priteshgupta" class="s3d twitter"> Twitter <span class="icons twitter"></span> </a> <a href="http://www.facebook.com/priteshgupta" class="s3d facebook"> Facebook <span class="icons facebook"></span> </a> <a href="http://forrst.com/people/priteshgupta" class="s3d forrst"> Forrst <span class="icons forrst"></span> </a> <a href="http://www.flickr.com/photos/priteshgupta" class="s3d flickr"> Flickr <span class="icons flickr"></span> </a> <a href="#" class="s3d designmoo"> Designmoo <span class="icons designmoo"></span> </a> </div> </div> <div class="border2"></div> <br /> <span class="copyright"><span class="left"><br /> &copy; Copyright 2012 - All Rights Reserved - <a href="#">Domain Name</a></span><span class="right"><br /> Design by <a href="http://www.priteshgupta.com">PriteshGupta.com</a><br /> <br> <br /> </span></span></footer> </div> </body> </html>
Java
/* * Copyright (C) 1997 Martin Jones ([email protected]) * (C) 1997 Torben Weis ([email protected]) * (C) 1998 Waldo Bastian ([email protected]) * (C) 1999 Lars Knoll ([email protected]) * (C) 1999 Antti Koivisto ([email protected]) * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserved. * Copyright (C) 2006 Alexey Proskuryakov ([email protected]) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "config.h" #include "RenderTableSection.h" #include "CachedImage.h" #include "Document.h" #include "HitTestResult.h" #include "HTMLNames.h" #include "PaintInfo.h" #include "RenderTableCell.h" #include "RenderTableCol.h" #include "RenderTableRow.h" #include "RenderView.h" #include <limits> #include <wtf/HashSet.h> #include <wtf/Vector.h> using namespace std; namespace WebCore { using namespace HTMLNames; // Those 2 variables are used to balance the memory consumption vs the repaint time on big tables. static unsigned gMinTableSizeToUseFastPaintPathWithOverflowingCell = 75 * 75; static float gMaxAllowedOverflowingCellRatioForFastPaintPath = 0.1f; static inline void setRowLogicalHeightToRowStyleLogicalHeightIfNotRelative(RenderTableSection::RowStruct* row) { ASSERT(row && row->rowRenderer); row->logicalHeight = row->rowRenderer->style()->logicalHeight(); if (row->logicalHeight.isRelative()) row->logicalHeight = Length(); } RenderTableSection::RenderTableSection(Node* node) : RenderBox(node) , m_gridRows(0) , m_cCol(0) , m_cRow(-1) , m_outerBorderStart(0) , m_outerBorderEnd(0) , m_outerBorderBefore(0) , m_outerBorderAfter(0) , m_needsCellRecalc(false) , m_hasMultipleCellLevels(false) { // init RenderObject attributes setInline(false); // our object is not Inline } RenderTableSection::~RenderTableSection() { clearGrid(); } void RenderTableSection::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) { RenderBox::styleDidChange(diff, oldStyle); propagateStyleToAnonymousChildren(); } void RenderTableSection::willBeDestroyed() { RenderTable* recalcTable = table(); RenderBox::willBeDestroyed(); // recalc cell info because RenderTable has unguarded pointers // stored that point to this RenderTableSection. if (recalcTable) recalcTable->setNeedsSectionRecalc(); } void RenderTableSection::addChild(RenderObject* child, RenderObject* beforeChild) { // Make sure we don't append things after :after-generated content if we have it. if (!beforeChild) { if (RenderObject* afterContentRenderer = findAfterContentRenderer()) beforeChild = anonymousContainer(afterContentRenderer); } if (!child->isTableRow()) { RenderObject* last = beforeChild; if (!last) last = lastChild(); if (last && last->isAnonymous() && !last->isBeforeOrAfterContent()) { if (beforeChild == last) beforeChild = last->firstChild(); last->addChild(child, beforeChild); return; } // If beforeChild is inside an anonymous cell/row, insert into the cell or into // the anonymous row containing it, if there is one. RenderObject* lastBox = last; while (lastBox && lastBox->parent()->isAnonymous() && !lastBox->isTableRow()) lastBox = lastBox->parent(); if (lastBox && lastBox->isAnonymous() && !lastBox->isBeforeOrAfterContent()) { lastBox->addChild(child, beforeChild); return; } RenderObject* row = new (renderArena()) RenderTableRow(document() /* anonymous table row */); RefPtr<RenderStyle> newStyle = RenderStyle::create(); newStyle->inheritFrom(style()); newStyle->setDisplay(TABLE_ROW); row->setStyle(newStyle.release()); addChild(row, beforeChild); row->addChild(child); return; } if (beforeChild) setNeedsCellRecalc(); ++m_cRow; m_cCol = 0; // make sure we have enough rows if (!ensureRows(m_cRow + 1)) return; m_grid[m_cRow].rowRenderer = toRenderTableRow(child); if (!beforeChild) setRowLogicalHeightToRowStyleLogicalHeightIfNotRelative(&m_grid[m_cRow]); // If the next renderer is actually wrapped in an anonymous table row, we need to go up and find that. while (beforeChild && beforeChild->parent() != this) beforeChild = beforeChild->parent(); ASSERT(!beforeChild || beforeChild->isTableRow()); RenderBox::addChild(child, beforeChild); toRenderTableRow(child)->updateBeforeAndAfterContent(); } void RenderTableSection::removeChild(RenderObject* oldChild) { setNeedsCellRecalc(); RenderBox::removeChild(oldChild); } bool RenderTableSection::ensureRows(int numRows) { int nRows = m_gridRows; if (numRows > nRows) { if (numRows > static_cast<int>(m_grid.size())) { size_t maxSize = numeric_limits<size_t>::max() / sizeof(RowStruct); if (static_cast<size_t>(numRows) > maxSize) return false; m_grid.grow(numRows); } m_gridRows = numRows; int nCols = max(1, table()->numEffCols()); for (int r = nRows; r < numRows; r++) { m_grid[r].row = new Row(nCols); m_grid[r].rowRenderer = 0; m_grid[r].baseline = 0; m_grid[r].logicalHeight = Length(); } } return true; } void RenderTableSection::addCell(RenderTableCell* cell, RenderTableRow* row) { int rSpan = cell->rowSpan(); int cSpan = cell->colSpan(); Vector<RenderTable::ColumnStruct>& columns = table()->columns(); int nCols = columns.size(); // ### mozilla still seems to do the old HTML way, even for strict DTD // (see the annotation on table cell layouting in the CSS specs and the testcase below: // <TABLE border> // <TR><TD>1 <TD rowspan="2">2 <TD>3 <TD>4 // <TR><TD colspan="2">5 // </TABLE> while (m_cCol < nCols && (cellAt(m_cRow, m_cCol).hasCells() || cellAt(m_cRow, m_cCol).inColSpan)) m_cCol++; if (rSpan == 1) { // we ignore height settings on rowspan cells Length logicalHeight = cell->style()->logicalHeight(); if (logicalHeight.isPositive() || (logicalHeight.isRelative() && logicalHeight.value() >= 0)) { Length cRowLogicalHeight = m_grid[m_cRow].logicalHeight; switch (logicalHeight.type()) { case Percent: if (!(cRowLogicalHeight.isPercent()) || (cRowLogicalHeight.isPercent() && cRowLogicalHeight.percent() < logicalHeight.percent())) m_grid[m_cRow].logicalHeight = logicalHeight; break; case Fixed: if (cRowLogicalHeight.type() < Percent || (cRowLogicalHeight.isFixed() && cRowLogicalHeight.value() < logicalHeight.value())) m_grid[m_cRow].logicalHeight = logicalHeight; break; case Relative: default: break; } } } // make sure we have enough rows if (!ensureRows(m_cRow + rSpan)) return; m_grid[m_cRow].rowRenderer = row; int col = m_cCol; // tell the cell where it is bool inColSpan = false; while (cSpan) { int currentSpan; if (m_cCol >= nCols) { table()->appendColumn(cSpan); currentSpan = cSpan; } else { if (cSpan < (int)columns[m_cCol].span) table()->splitColumn(m_cCol, cSpan); currentSpan = columns[m_cCol].span; } for (int r = 0; r < rSpan; r++) { CellStruct& c = cellAt(m_cRow + r, m_cCol); ASSERT(cell); c.cells.append(cell); // If cells overlap then we take the slow path for painting. if (c.cells.size() > 1) m_hasMultipleCellLevels = true; if (inColSpan) c.inColSpan = true; } m_cCol++; cSpan -= currentSpan; inColSpan = true; } cell->setRow(m_cRow); cell->setCol(table()->effColToCol(col)); } void RenderTableSection::setCellLogicalWidths() { Vector<LayoutUnit>& columnPos = table()->columnPositions(); LayoutStateMaintainer statePusher(view()); for (int i = 0; i < m_gridRows; i++) { Row& row = *m_grid[i].row; int cols = row.size(); for (int j = 0; j < cols; j++) { CellStruct& current = row[j]; RenderTableCell* cell = current.primaryCell(); if (!cell || current.inColSpan) continue; int endCol = j; int cspan = cell->colSpan(); while (cspan && endCol < cols) { ASSERT(endCol < (int)table()->columns().size()); cspan -= table()->columns()[endCol].span; endCol++; } int w = columnPos[endCol] - columnPos[j] - table()->hBorderSpacing(); int oldLogicalWidth = cell->logicalWidth(); if (w != oldLogicalWidth) { cell->setNeedsLayout(true); if (!table()->selfNeedsLayout() && cell->checkForRepaintDuringLayout()) { if (!statePusher.didPush()) { // Technically, we should also push state for the row, but since // rows don't push a coordinate transform, that's not necessary. statePusher.push(this, IntSize(x(), y())); } cell->repaint(); } cell->updateLogicalWidth(w); } } } statePusher.pop(); // only pops if we pushed } LayoutUnit RenderTableSection::calcRowLogicalHeight() { #ifndef NDEBUG setNeedsLayoutIsForbidden(true); #endif ASSERT(!needsLayout()); RenderTableCell* cell; LayoutUnit spacing = table()->vBorderSpacing(); LayoutStateMaintainer statePusher(view()); m_rowPos.resize(m_gridRows + 1); m_rowPos[0] = spacing; for (int r = 0; r < m_gridRows; r++) { m_rowPos[r + 1] = 0; m_grid[r].baseline = 0; LayoutUnit baseline = 0; LayoutUnit bdesc = 0; LayoutUnit ch = m_grid[r].logicalHeight.calcMinValue(0); LayoutUnit pos = m_rowPos[r] + ch + (m_grid[r].rowRenderer ? spacing : 0); m_rowPos[r + 1] = max(m_rowPos[r + 1], pos); Row* row = m_grid[r].row; int totalCols = row->size(); for (int c = 0; c < totalCols; c++) { CellStruct& current = cellAt(r, c); cell = current.primaryCell(); if (!cell || current.inColSpan) continue; if ((cell->row() + cell->rowSpan() - 1) > r) continue; int indx = max(r - cell->rowSpan() + 1, 0); if (cell->hasOverrideHeight()) { if (!statePusher.didPush()) { // Technically, we should also push state for the row, but since // rows don't push a coordinate transform, that's not necessary. statePusher.push(this, locationOffset()); } cell->clearIntrinsicPadding(); cell->clearOverrideSize(); cell->setChildNeedsLayout(true, false); cell->layoutIfNeeded(); } LayoutUnit adjustedPaddingBefore = cell->paddingBefore() - cell->intrinsicPaddingBefore(); LayoutUnit adjustedPaddingAfter = cell->paddingAfter() - cell->intrinsicPaddingAfter(); LayoutUnit adjustedLogicalHeight = cell->logicalHeight() - (cell->intrinsicPaddingBefore() + cell->intrinsicPaddingAfter()); // Explicit heights use the border box in quirks mode. In strict mode do the right // thing and actually add in the border and padding. ch = cell->style()->logicalHeight().calcValue(0) + (document()->inQuirksMode() ? 0 : (adjustedPaddingBefore + adjustedPaddingAfter + cell->borderBefore() + cell->borderAfter())); ch = max(ch, adjustedLogicalHeight); pos = m_rowPos[indx] + ch + (m_grid[r].rowRenderer ? spacing : 0); m_rowPos[r + 1] = max(m_rowPos[r + 1], pos); // find out the baseline EVerticalAlign va = cell->style()->verticalAlign(); if (va == BASELINE || va == TEXT_BOTTOM || va == TEXT_TOP || va == SUPER || va == SUB) { LayoutUnit b = cell->cellBaselinePosition(); if (b > cell->borderBefore() + cell->paddingBefore()) { baseline = max(baseline, b - cell->intrinsicPaddingBefore()); bdesc = max(bdesc, m_rowPos[indx] + ch - (b - cell->intrinsicPaddingBefore())); } } } // do we have baseline aligned elements? if (baseline) { // increase rowheight if baseline requires m_rowPos[r + 1] = max(m_rowPos[r + 1], baseline + bdesc + (m_grid[r].rowRenderer ? spacing : 0)); m_grid[r].baseline = baseline; } m_rowPos[r + 1] = max(m_rowPos[r + 1], m_rowPos[r]); } #ifndef NDEBUG setNeedsLayoutIsForbidden(false); #endif ASSERT(!needsLayout()); statePusher.pop(); return m_rowPos[m_gridRows]; } void RenderTableSection::layout() { ASSERT(needsLayout()); LayoutStateMaintainer statePusher(view(), this, locationOffset(), style()->isFlippedBlocksWritingMode()); for (RenderObject* child = children()->firstChild(); child; child = child->nextSibling()) { if (child->isTableRow()) { child->layoutIfNeeded(); ASSERT(!child->needsLayout()); } } statePusher.pop(); setNeedsLayout(false); } LayoutUnit RenderTableSection::layoutRows(LayoutUnit toAdd) { #ifndef NDEBUG setNeedsLayoutIsForbidden(true); #endif ASSERT(!needsLayout()); LayoutUnit rHeight; int rindx; int totalRows = m_gridRows; // Set the width of our section now. The rows will also be this width. setLogicalWidth(table()->contentLogicalWidth()); m_overflow.clear(); m_overflowingCells.clear(); m_forceSlowPaintPathWithOverflowingCell = false; if (toAdd && totalRows && (m_rowPos[totalRows] || !nextSibling())) { LayoutUnit totalHeight = m_rowPos[totalRows] + toAdd; LayoutUnit dh = toAdd; int totalPercent = 0; int numAuto = 0; for (int r = 0; r < totalRows; r++) { if (m_grid[r].logicalHeight.isAuto()) numAuto++; else if (m_grid[r].logicalHeight.isPercent()) totalPercent += m_grid[r].logicalHeight.percent(); } if (totalPercent) { // try to satisfy percent LayoutUnit add = 0; totalPercent = min(totalPercent, 100); int rh = m_rowPos[1] - m_rowPos[0]; for (int r = 0; r < totalRows; r++) { if (totalPercent > 0 && m_grid[r].logicalHeight.isPercent()) { LayoutUnit toAdd = min(dh, static_cast<LayoutUnit>((totalHeight * m_grid[r].logicalHeight.percent() / 100) - rh)); // If toAdd is negative, then we don't want to shrink the row (this bug // affected Outlook Web Access). toAdd = max<LayoutUnit>(0, toAdd); add += toAdd; dh -= toAdd; totalPercent -= m_grid[r].logicalHeight.percent(); } if (r < totalRows - 1) rh = m_rowPos[r + 2] - m_rowPos[r + 1]; m_rowPos[r + 1] += add; } } if (numAuto) { // distribute over variable cols LayoutUnit add = 0; for (int r = 0; r < totalRows; r++) { if (numAuto > 0 && m_grid[r].logicalHeight.isAuto()) { LayoutUnit toAdd = dh / numAuto; add += toAdd; dh -= toAdd; numAuto--; } m_rowPos[r + 1] += add; } } if (dh > 0 && m_rowPos[totalRows]) { // if some left overs, distribute equally. LayoutUnit tot = m_rowPos[totalRows]; LayoutUnit add = 0; LayoutUnit prev = m_rowPos[0]; for (int r = 0; r < totalRows; r++) { // weight with the original height add += dh * (m_rowPos[r + 1] - prev) / tot; prev = m_rowPos[r + 1]; m_rowPos[r + 1] += add; } } } LayoutUnit hspacing = table()->hBorderSpacing(); LayoutUnit vspacing = table()->vBorderSpacing(); LayoutUnit nEffCols = table()->numEffCols(); LayoutStateMaintainer statePusher(view(), this, LayoutSize(x(), y()), style()->isFlippedBlocksWritingMode()); for (int r = 0; r < totalRows; r++) { // Set the row's x/y position and width/height. if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer) { rowRenderer->setLocation(LayoutPoint(0, m_rowPos[r])); rowRenderer->setLogicalWidth(logicalWidth()); rowRenderer->setLogicalHeight(m_rowPos[r + 1] - m_rowPos[r] - vspacing); rowRenderer->updateLayerTransform(); } for (int c = 0; c < nEffCols; c++) { CellStruct& cs = cellAt(r, c); RenderTableCell* cell = cs.primaryCell(); if (!cell || cs.inColSpan) continue; rindx = cell->row(); rHeight = m_rowPos[rindx + cell->rowSpan()] - m_rowPos[rindx] - vspacing; // Force percent height children to lay themselves out again. // This will cause these children to grow to fill the cell. // FIXME: There is still more work to do here to fully match WinIE (should // it become necessary to do so). In quirks mode, WinIE behaves like we // do, but it will clip the cells that spill out of the table section. In // strict mode, Mozilla and WinIE both regrow the table to accommodate the // new height of the cell (thus letting the percentages cause growth one // time only). We may also not be handling row-spanning cells correctly. // // Note also the oddity where replaced elements always flex, and yet blocks/tables do // not necessarily flex. WinIE is crazy and inconsistent, and we can't hope to // match the behavior perfectly, but we'll continue to refine it as we discover new // bugs. :) bool cellChildrenFlex = false; bool flexAllChildren = cell->style()->logicalHeight().isFixed() || (!table()->style()->logicalHeight().isAuto() && rHeight != cell->logicalHeight()); for (RenderObject* o = cell->firstChild(); o; o = o->nextSibling()) { if (!o->isText() && o->style()->logicalHeight().isPercent() && (flexAllChildren || o->isReplaced() || (o->isBox() && toRenderBox(o)->scrollsOverflow()))) { // Tables with no sections do not flex. if (!o->isTable() || toRenderTable(o)->hasSections()) { o->setNeedsLayout(true, false); cellChildrenFlex = true; } } } if (HashSet<RenderBox*>* percentHeightDescendants = cell->percentHeightDescendants()) { HashSet<RenderBox*>::iterator end = percentHeightDescendants->end(); for (HashSet<RenderBox*>::iterator it = percentHeightDescendants->begin(); it != end; ++it) { RenderBox* box = *it; if (!box->isReplaced() && !box->scrollsOverflow() && !flexAllChildren) continue; while (box != cell) { if (box->normalChildNeedsLayout()) break; box->setChildNeedsLayout(true, false); box = box->containingBlock(); ASSERT(box); if (!box) break; } cellChildrenFlex = true; } } if (cellChildrenFlex) { cell->setChildNeedsLayout(true, false); // Alignment within a cell is based off the calculated // height, which becomes irrelevant once the cell has // been resized based off its percentage. cell->setOverrideHeightFromRowHeight(rHeight); cell->layoutIfNeeded(); // If the baseline moved, we may have to update the data for our row. Find out the new baseline. EVerticalAlign va = cell->style()->verticalAlign(); if (va == BASELINE || va == TEXT_BOTTOM || va == TEXT_TOP || va == SUPER || va == SUB) { LayoutUnit baseline = cell->cellBaselinePosition(); if (baseline > cell->borderBefore() + cell->paddingBefore()) m_grid[r].baseline = max(m_grid[r].baseline, baseline); } } LayoutUnit oldIntrinsicPaddingBefore = cell->intrinsicPaddingBefore(); LayoutUnit oldIntrinsicPaddingAfter = cell->intrinsicPaddingAfter(); LayoutUnit logicalHeightWithoutIntrinsicPadding = cell->logicalHeight() - oldIntrinsicPaddingBefore - oldIntrinsicPaddingAfter; LayoutUnit intrinsicPaddingBefore = 0; switch (cell->style()->verticalAlign()) { case SUB: case SUPER: case TEXT_TOP: case TEXT_BOTTOM: case BASELINE: { LayoutUnit b = cell->cellBaselinePosition(); if (b > cell->borderBefore() + cell->paddingBefore()) intrinsicPaddingBefore = getBaseline(r) - (b - oldIntrinsicPaddingBefore); break; } case TOP: break; case MIDDLE: intrinsicPaddingBefore = (rHeight - logicalHeightWithoutIntrinsicPadding) / 2; break; case BOTTOM: intrinsicPaddingBefore = rHeight - logicalHeightWithoutIntrinsicPadding; break; default: break; } LayoutUnit intrinsicPaddingAfter = rHeight - logicalHeightWithoutIntrinsicPadding - intrinsicPaddingBefore; cell->setIntrinsicPaddingBefore(intrinsicPaddingBefore); cell->setIntrinsicPaddingAfter(intrinsicPaddingAfter); LayoutRect oldCellRect(cell->x(), cell->y() , cell->width(), cell->height()); LayoutPoint cellLocation(0, m_rowPos[rindx]); if (!style()->isLeftToRightDirection()) cellLocation.setX(table()->columnPositions()[nEffCols] - table()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + hspacing); else cellLocation.setX(table()->columnPositions()[c] + hspacing); cell->setLogicalLocation(cellLocation); view()->addLayoutDelta(oldCellRect.location() - cell->location()); if (intrinsicPaddingBefore != oldIntrinsicPaddingBefore || intrinsicPaddingAfter != oldIntrinsicPaddingAfter) cell->setNeedsLayout(true, false); if (!cell->needsLayout() && view()->layoutState()->pageLogicalHeight() && view()->layoutState()->pageLogicalOffset(cell->logicalTop()) != cell->pageLogicalOffset()) cell->setChildNeedsLayout(true, false); cell->layoutIfNeeded(); // FIXME: Make pagination work with vertical tables. if (style()->isHorizontalWritingMode() && view()->layoutState()->pageLogicalHeight() && cell->height() != rHeight) cell->setHeight(rHeight); // FIXME: Pagination might have made us change size. For now just shrink or grow the cell to fit without doing a relayout. LayoutSize childOffset(cell->location() - oldCellRect.location()); if (childOffset.width() || childOffset.height()) { view()->addLayoutDelta(childOffset); // If the child moved, we have to repaint it as well as any floating/positioned // descendants. An exception is if we need a layout. In this case, we know we're going to // repaint ourselves (and the child) anyway. if (!table()->selfNeedsLayout() && cell->checkForRepaintDuringLayout()) cell->repaintDuringLayoutIfMoved(oldCellRect); } } } #ifndef NDEBUG setNeedsLayoutIsForbidden(false); #endif ASSERT(!needsLayout()); setLogicalHeight(m_rowPos[totalRows]); unsigned totalCellsCount = nEffCols * totalRows; int maxAllowedOverflowingCellsCount = totalCellsCount < gMinTableSizeToUseFastPaintPathWithOverflowingCell ? 0 : gMaxAllowedOverflowingCellRatioForFastPaintPath * totalCellsCount; #ifndef NDEBUG bool hasOverflowingCell = false; #endif // Now that our height has been determined, add in overflow from cells. for (int r = 0; r < totalRows; r++) { for (int c = 0; c < nEffCols; c++) { CellStruct& cs = cellAt(r, c); RenderTableCell* cell = cs.primaryCell(); if (!cell || cs.inColSpan) continue; if (r < totalRows - 1 && cell == primaryCellAt(r + 1, c)) continue; addOverflowFromChild(cell); #ifndef NDEBUG hasOverflowingCell |= cell->hasVisualOverflow(); #endif if (cell->hasVisualOverflow() && !m_forceSlowPaintPathWithOverflowingCell) { m_overflowingCells.add(cell); if (m_overflowingCells.size() > maxAllowedOverflowingCellsCount) { // We need to set m_forcesSlowPaintPath only if there is a least one overflowing cells as the hit testing code rely on this information. m_forceSlowPaintPathWithOverflowingCell = true; // The slow path does not make any use of the overflowing cells info, don't hold on to the memory. m_overflowingCells.clear(); } } } } ASSERT(hasOverflowingCell == this->hasOverflowingCell()); statePusher.pop(); return height(); } LayoutUnit RenderTableSection::calcOuterBorderBefore() const { int totalCols = table()->numEffCols(); if (!m_gridRows || !totalCols) return 0; unsigned borderWidth = 0; const BorderValue& sb = style()->borderBefore(); if (sb.style() == BHIDDEN) return -1; if (sb.style() > BHIDDEN) borderWidth = sb.width(); const BorderValue& rb = firstChild()->style()->borderBefore(); if (rb.style() == BHIDDEN) return -1; if (rb.style() > BHIDDEN && rb.width() > borderWidth) borderWidth = rb.width(); bool allHidden = true; for (int c = 0; c < totalCols; c++) { const CellStruct& current = cellAt(0, c); if (current.inColSpan || !current.hasCells()) continue; const BorderValue& cb = current.primaryCell()->style()->borderBefore(); // FIXME: Make this work with perpendicular and flipped cells. // FIXME: Don't repeat for the same col group RenderTableCol* colGroup = table()->colElement(c); if (colGroup) { const BorderValue& gb = colGroup->style()->borderBefore(); if (gb.style() == BHIDDEN || cb.style() == BHIDDEN) continue; allHidden = false; if (gb.style() > BHIDDEN && gb.width() > borderWidth) borderWidth = gb.width(); if (cb.style() > BHIDDEN && cb.width() > borderWidth) borderWidth = cb.width(); } else { if (cb.style() == BHIDDEN) continue; allHidden = false; if (cb.style() > BHIDDEN && cb.width() > borderWidth) borderWidth = cb.width(); } } if (allHidden) return -1; return borderWidth / 2; } LayoutUnit RenderTableSection::calcOuterBorderAfter() const { int totalCols = table()->numEffCols(); if (!m_gridRows || !totalCols) return 0; unsigned borderWidth = 0; const BorderValue& sb = style()->borderAfter(); if (sb.style() == BHIDDEN) return -1; if (sb.style() > BHIDDEN) borderWidth = sb.width(); const BorderValue& rb = lastChild()->style()->borderAfter(); if (rb.style() == BHIDDEN) return -1; if (rb.style() > BHIDDEN && rb.width() > borderWidth) borderWidth = rb.width(); bool allHidden = true; for (int c = 0; c < totalCols; c++) { const CellStruct& current = cellAt(m_gridRows - 1, c); if (current.inColSpan || !current.hasCells()) continue; const BorderValue& cb = current.primaryCell()->style()->borderAfter(); // FIXME: Make this work with perpendicular and flipped cells. // FIXME: Don't repeat for the same col group RenderTableCol* colGroup = table()->colElement(c); if (colGroup) { const BorderValue& gb = colGroup->style()->borderAfter(); if (gb.style() == BHIDDEN || cb.style() == BHIDDEN) continue; allHidden = false; if (gb.style() > BHIDDEN && gb.width() > borderWidth) borderWidth = gb.width(); if (cb.style() > BHIDDEN && cb.width() > borderWidth) borderWidth = cb.width(); } else { if (cb.style() == BHIDDEN) continue; allHidden = false; if (cb.style() > BHIDDEN && cb.width() > borderWidth) borderWidth = cb.width(); } } if (allHidden) return -1; return (borderWidth + 1) / 2; } LayoutUnit RenderTableSection::calcOuterBorderStart() const { int totalCols = table()->numEffCols(); if (!m_gridRows || !totalCols) return 0; unsigned borderWidth = 0; const BorderValue& sb = style()->borderStart(); if (sb.style() == BHIDDEN) return -1; if (sb.style() > BHIDDEN) borderWidth = sb.width(); if (RenderTableCol* colGroup = table()->colElement(0)) { const BorderValue& gb = colGroup->style()->borderStart(); if (gb.style() == BHIDDEN) return -1; if (gb.style() > BHIDDEN && gb.width() > borderWidth) borderWidth = gb.width(); } bool allHidden = true; for (int r = 0; r < m_gridRows; r++) { const CellStruct& current = cellAt(r, 0); if (!current.hasCells()) continue; // FIXME: Don't repeat for the same cell const BorderValue& cb = current.primaryCell()->style()->borderStart(); // FIXME: Make this work with perpendicular and flipped cells. const BorderValue& rb = current.primaryCell()->parent()->style()->borderStart(); if (cb.style() == BHIDDEN || rb.style() == BHIDDEN) continue; allHidden = false; if (cb.style() > BHIDDEN && cb.width() > borderWidth) borderWidth = cb.width(); if (rb.style() > BHIDDEN && rb.width() > borderWidth) borderWidth = rb.width(); } if (allHidden) return -1; return (borderWidth + (table()->style()->isLeftToRightDirection() ? 0 : 1)) / 2; } LayoutUnit RenderTableSection::calcOuterBorderEnd() const { int totalCols = table()->numEffCols(); if (!m_gridRows || !totalCols) return 0; unsigned borderWidth = 0; const BorderValue& sb = style()->borderEnd(); if (sb.style() == BHIDDEN) return -1; if (sb.style() > BHIDDEN) borderWidth = sb.width(); if (RenderTableCol* colGroup = table()->colElement(totalCols - 1)) { const BorderValue& gb = colGroup->style()->borderEnd(); if (gb.style() == BHIDDEN) return -1; if (gb.style() > BHIDDEN && gb.width() > borderWidth) borderWidth = gb.width(); } bool allHidden = true; for (int r = 0; r < m_gridRows; r++) { const CellStruct& current = cellAt(r, totalCols - 1); if (!current.hasCells()) continue; // FIXME: Don't repeat for the same cell const BorderValue& cb = current.primaryCell()->style()->borderEnd(); // FIXME: Make this work with perpendicular and flipped cells. const BorderValue& rb = current.primaryCell()->parent()->style()->borderEnd(); if (cb.style() == BHIDDEN || rb.style() == BHIDDEN) continue; allHidden = false; if (cb.style() > BHIDDEN && cb.width() > borderWidth) borderWidth = cb.width(); if (rb.style() > BHIDDEN && rb.width() > borderWidth) borderWidth = rb.width(); } if (allHidden) return -1; return (borderWidth + (table()->style()->isLeftToRightDirection() ? 1 : 0)) / 2; } void RenderTableSection::recalcOuterBorder() { m_outerBorderBefore = calcOuterBorderBefore(); m_outerBorderAfter = calcOuterBorderAfter(); m_outerBorderStart = calcOuterBorderStart(); m_outerBorderEnd = calcOuterBorderEnd(); } LayoutUnit RenderTableSection::firstLineBoxBaseline() const { if (!m_gridRows) return -1; LayoutUnit firstLineBaseline = m_grid[0].baseline; if (firstLineBaseline) return firstLineBaseline + m_rowPos[0]; firstLineBaseline = -1; Row* firstRow = m_grid[0].row; for (size_t i = 0; i < firstRow->size(); ++i) { CellStruct& cs = firstRow->at(i); RenderTableCell* cell = cs.primaryCell(); if (cell) firstLineBaseline = max(firstLineBaseline, cell->logicalTop() + cell->paddingBefore() + cell->borderBefore() + cell->contentLogicalHeight()); } return firstLineBaseline; } void RenderTableSection::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) { // put this back in when all layout tests can handle it // ASSERT(!needsLayout()); // avoid crashing on bugs that cause us to paint with dirty layout if (needsLayout()) return; unsigned totalRows = m_gridRows; unsigned totalCols = table()->columns().size(); if (!totalRows || !totalCols) return; LayoutPoint adjustedPaintOffset = paintOffset + location(); PaintPhase phase = paintInfo.phase; bool pushedClip = pushContentsClip(paintInfo, adjustedPaintOffset); paintObject(paintInfo, adjustedPaintOffset); if (pushedClip) popContentsClip(paintInfo, phase, adjustedPaintOffset); } static inline bool compareCellPositions(RenderTableCell* elem1, RenderTableCell* elem2) { return elem1->row() < elem2->row(); } // This comparison is used only when we have overflowing cells as we have an unsorted array to sort. We thus need // to sort both on rows and columns to properly repaint. static inline bool compareCellPositionsWithOverflowingCells(RenderTableCell* elem1, RenderTableCell* elem2) { if (elem1->row() != elem2->row()) return elem1->row() < elem2->row(); return elem1->col() < elem2->col(); } void RenderTableSection::paintCell(RenderTableCell* cell, PaintInfo& paintInfo, const LayoutPoint& paintOffset) { LayoutPoint cellPoint = flipForWritingMode(cell, paintOffset, ParentToChildFlippingAdjustment); PaintPhase paintPhase = paintInfo.phase; RenderTableRow* row = toRenderTableRow(cell->parent()); if (paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) { // We need to handle painting a stack of backgrounds. This stack (from bottom to top) consists of // the column group, column, row group, row, and then the cell. RenderObject* col = table()->colElement(cell->col()); RenderObject* colGroup = 0; if (col && col->parent()->style()->display() == TABLE_COLUMN_GROUP) colGroup = col->parent(); // Column groups and columns first. // FIXME: Columns and column groups do not currently support opacity, and they are being painted "too late" in // the stack, since we have already opened a transparency layer (potentially) for the table row group. // Note that we deliberately ignore whether or not the cell has a layer, since these backgrounds paint "behind" the // cell. cell->paintBackgroundsBehindCell(paintInfo, cellPoint, colGroup); cell->paintBackgroundsBehindCell(paintInfo, cellPoint, col); // Paint the row group next. cell->paintBackgroundsBehindCell(paintInfo, cellPoint, this); // Paint the row next, but only if it doesn't have a layer. If a row has a layer, it will be responsible for // painting the row background for the cell. if (!row->hasSelfPaintingLayer()) cell->paintBackgroundsBehindCell(paintInfo, cellPoint, row); } if ((!cell->hasSelfPaintingLayer() && !row->hasSelfPaintingLayer()) || paintInfo.phase == PaintPhaseCollapsedTableBorders) cell->paint(paintInfo, cellPoint); } void RenderTableSection::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset) { // Check which rows and cols are visible and only paint these. unsigned totalRows = m_gridRows; unsigned totalCols = table()->columns().size(); PaintPhase paintPhase = paintInfo.phase; LayoutUnit os = 2 * maximalOutlineSize(paintPhase); unsigned startrow = 0; unsigned endrow = totalRows; LayoutRect localRepaintRect = paintInfo.rect; localRepaintRect.moveBy(-paintOffset); if (style()->isFlippedBlocksWritingMode()) { if (style()->isHorizontalWritingMode()) localRepaintRect.setY(height() - localRepaintRect.maxY()); else localRepaintRect.setX(width() - localRepaintRect.maxX()); } if (!m_forceSlowPaintPathWithOverflowingCell) { LayoutUnit before = (style()->isHorizontalWritingMode() ? localRepaintRect.y() : localRepaintRect.x()) - os; // binary search to find a row startrow = std::lower_bound(m_rowPos.begin(), m_rowPos.end(), before) - m_rowPos.begin(); // The binary search above gives us the first row with // a y position >= the top of the paint rect. Thus, the previous // may need to be repainted as well. if (startrow == m_rowPos.size() || (startrow > 0 && (m_rowPos[startrow] > before))) --startrow; LayoutUnit after = (style()->isHorizontalWritingMode() ? localRepaintRect.maxY() : localRepaintRect.maxX()) + os; endrow = std::lower_bound(m_rowPos.begin(), m_rowPos.end(), after) - m_rowPos.begin(); if (endrow == m_rowPos.size()) --endrow; if (!endrow && m_rowPos[0] - table()->outerBorderBefore() <= after) ++endrow; } unsigned startcol = 0; unsigned endcol = totalCols; // FIXME: Implement RTL. if (!m_forceSlowPaintPathWithOverflowingCell && style()->isLeftToRightDirection()) { LayoutUnit start = (style()->isHorizontalWritingMode() ? localRepaintRect.x() : localRepaintRect.y()) - os; Vector<LayoutUnit>& columnPos = table()->columnPositions(); startcol = std::lower_bound(columnPos.begin(), columnPos.end(), start) - columnPos.begin(); if ((startcol == columnPos.size()) || (startcol > 0 && (columnPos[startcol] > start))) --startcol; LayoutUnit end = (style()->isHorizontalWritingMode() ? localRepaintRect.maxX() : localRepaintRect.maxY()) + os; endcol = std::lower_bound(columnPos.begin(), columnPos.end(), end) - columnPos.begin(); if (endcol == columnPos.size()) --endcol; if (!endcol && columnPos[0] - table()->outerBorderStart() <= end) ++endcol; } if (startcol < endcol) { if (!m_hasMultipleCellLevels && !m_overflowingCells.size()) { // Draw the dirty cells in the order that they appear. for (unsigned r = startrow; r < endrow; r++) { for (unsigned c = startcol; c < endcol; c++) { CellStruct& current = cellAt(r, c); RenderTableCell* cell = current.primaryCell(); if (!cell || (r > startrow && primaryCellAt(r - 1, c) == cell) || (c > startcol && primaryCellAt(r, c - 1) == cell)) continue; paintCell(cell, paintInfo, paintOffset); } } } else { // The overflowing cells should be scarce to avoid adding a lot of cells to the HashSet. ASSERT(m_overflowingCells.size() < totalRows * totalCols * gMaxAllowedOverflowingCellRatioForFastPaintPath); // To make sure we properly repaint the section, we repaint all the overflowing cells that we collected. Vector<RenderTableCell*> cells; copyToVector(m_overflowingCells, cells); HashSet<RenderTableCell*> spanningCells; for (unsigned r = startrow; r < endrow; r++) { for (unsigned c = startcol; c < endcol; c++) { CellStruct& current = cellAt(r, c); if (!current.hasCells()) continue; for (unsigned i = 0; i < current.cells.size(); ++i) { if (m_overflowingCells.contains(current.cells[i])) continue; if (current.cells[i]->rowSpan() > 1 || current.cells[i]->colSpan() > 1) { if (spanningCells.contains(current.cells[i])) continue; spanningCells.add(current.cells[i]); } cells.append(current.cells[i]); } } } // Sort the dirty cells by paint order. if (!m_overflowingCells.size()) std::stable_sort(cells.begin(), cells.end(), compareCellPositions); else std::sort(cells.begin(), cells.end(), compareCellPositionsWithOverflowingCells); int size = cells.size(); // Paint the cells. for (int i = 0; i < size; ++i) paintCell(cells[i], paintInfo, paintOffset); } } } void RenderTableSection::imageChanged(WrappedImagePtr, const IntRect*) { // FIXME: Examine cells and repaint only the rect the image paints in. repaint(); } void RenderTableSection::recalcCells() { m_cCol = 0; m_cRow = -1; clearGrid(); m_gridRows = 0; for (RenderObject* row = firstChild(); row; row = row->nextSibling()) { if (row->isTableRow()) { m_cRow++; m_cCol = 0; if (!ensureRows(m_cRow + 1)) break; RenderTableRow* tableRow = toRenderTableRow(row); m_grid[m_cRow].rowRenderer = tableRow; setRowLogicalHeightToRowStyleLogicalHeightIfNotRelative(&m_grid[m_cRow]); for (RenderObject* cell = row->firstChild(); cell; cell = cell->nextSibling()) { if (cell->isTableCell()) addCell(toRenderTableCell(cell), tableRow); } } } m_needsCellRecalc = false; setNeedsLayout(true); } void RenderTableSection::setNeedsCellRecalc() { m_needsCellRecalc = true; if (RenderTable* t = table()) t->setNeedsSectionRecalc(); } void RenderTableSection::clearGrid() { int rows = m_gridRows; while (rows--) delete m_grid[rows].row; } int RenderTableSection::numColumns() const { int result = 0; for (int r = 0; r < m_gridRows; ++r) { for (int c = result; c < table()->numEffCols(); ++c) { const CellStruct& cell = cellAt(r, c); if (cell.hasCells() || cell.inColSpan) result = c; } } return result + 1; } void RenderTableSection::appendColumn(int pos) { for (int row = 0; row < m_gridRows; ++row) m_grid[row].row->resize(pos + 1); } void RenderTableSection::splitColumn(int pos, int first) { if (m_cCol > pos) m_cCol++; for (int row = 0; row < m_gridRows; ++row) { Row& r = *m_grid[row].row; r.insert(pos + 1, CellStruct()); if (r[pos].hasCells()) { r[pos + 1].cells.append(r[pos].cells); RenderTableCell* cell = r[pos].primaryCell(); ASSERT(cell); int colleft = cell->colSpan() - r[pos].inColSpan; if (first > colleft) r[pos + 1].inColSpan = 0; else r[pos + 1].inColSpan = first + r[pos].inColSpan; } else { r[pos + 1].inColSpan = 0; } } } // Hit Testing bool RenderTableSection::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction action) { // If we have no children then we have nothing to do. if (!firstChild()) return false; // Table sections cannot ever be hit tested. Effectively they do not exist. // Just forward to our children always. LayoutPoint adjustedLocation = accumulatedOffset + location(); if (hasOverflowClip() && !overflowClipRect(adjustedLocation).intersects(result.rectForPoint(pointInContainer))) return false; if (hasOverflowingCell()) { for (RenderObject* child = lastChild(); child; child = child->previousSibling()) { // FIXME: We have to skip over inline flows, since they can show up inside table rows // at the moment (a demoted inline <form> for example). If we ever implement a // table-specific hit-test method (which we should do for performance reasons anyway), // then we can remove this check. if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer()) { LayoutPoint childPoint = flipForWritingMode(toRenderBox(child), adjustedLocation, ParentToChildFlippingAdjustment); if (child->nodeAtPoint(request, result, pointInContainer, childPoint, action)) { updateHitTestResult(result, toLayoutPoint(pointInContainer - childPoint)); return true; } } } return false; } LayoutPoint location = pointInContainer - toLayoutSize(adjustedLocation); if (style()->isFlippedBlocksWritingMode()) { if (style()->isHorizontalWritingMode()) location.setY(height() - location.y()); else location.setX(width() - location.x()); } LayoutUnit offsetInColumnDirection = style()->isHorizontalWritingMode() ? location.y() : location.x(); // Find the first row that starts after offsetInColumnDirection. unsigned nextRow = std::upper_bound(m_rowPos.begin(), m_rowPos.end(), offsetInColumnDirection) - m_rowPos.begin(); if (nextRow == m_rowPos.size()) return false; // Now set hitRow to the index of the hit row, or 0. unsigned hitRow = nextRow > 0 ? nextRow - 1 : 0; Vector<LayoutUnit>& columnPos = table()->columnPositions(); LayoutUnit offsetInRowDirection = style()->isHorizontalWritingMode() ? location.x() : location.y(); if (!style()->isLeftToRightDirection()) offsetInRowDirection = columnPos[columnPos.size() - 1] - offsetInRowDirection; unsigned nextColumn = std::lower_bound(columnPos.begin(), columnPos.end(), offsetInRowDirection) - columnPos.begin(); if (nextColumn == columnPos.size()) return false; unsigned hitColumn = nextColumn > 0 ? nextColumn - 1 : 0; CellStruct& current = cellAt(hitRow, hitColumn); // If the cell is empty, there's nothing to do if (!current.hasCells()) return false; for (int i = current.cells.size() - 1; i >= 0; --i) { RenderTableCell* cell = current.cells[i]; LayoutPoint cellPoint = flipForWritingMode(cell, adjustedLocation, ParentToChildFlippingAdjustment); if (static_cast<RenderObject*>(cell)->nodeAtPoint(request, result, pointInContainer, cellPoint, action)) { updateHitTestResult(result, toLayoutPoint(pointInContainer - cellPoint)); return true; } } return false; } } // namespace WebCore
Java
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- template designed by Marco Von Ballmoos --> <title>Docs for page edit_clock.php</title> <link rel="stylesheet" href="../media/stylesheet.css" /> <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> </head> <body> <div class="page-body"> <h2 class="file-name">/examples/edit_clock.php</h2> <a name="sec-description"></a> <div class="info-box"> <div class="info-box-title">Description</div> <div class="nav-bar"> <span class="disabled">Description</span> | <a href="#sec-includes">Includes</a> </div> <div class="info-box-body"> <!-- ========== Info from phpDoc block ========= --> </div> </div> <a name="sec-includes"></a> <div class="info-box"> <div class="info-box-title">Includes</div> <div class="nav-bar"> <a href="#sec-description">Description</a> | <span class="disabled">Includes</span> </div> <div class="info-box-body"> <a name="_/home/automation/Desktop/netconf-php-master/netconf/Device_php"><!-- --></a> <div class="oddrow"> <div> <span class="include-title"> <span class="include-type">include</span> (<span class="include-name">'/home/automation/Desktop/netconf-php-master/netconf/Device.php'</span>) (line <span class="line-number">2</span>) </span> </div> <!-- ========== Info from phpDoc block ========= --> </div> </div> </div> <p class="notes" id="credit"> Documentation generated on Thu, 27 Feb 2014 13:55:59 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a> </p> </div></body> </html>
Java
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os import logging import traceback import mallet_lda class MalletTagTopics(mallet_lda.MalletLDA): """ Topic modeling with separation based on tags """ def _basic_params(self): self.name = 'mallet_lda_tags' self.categorical = False self.template_name = 'mallet_lda' self.dry_run = False self.topics = 50 self.dfr = len(self.extra_args) > 0 if self.dfr: self.dfr_dir = self.extra_args[0] def post_setup(self): if self.named_args is not None: if 'tags' in self.named_args: self.tags = self.named_args['tags'] for filename in self.metadata.keys(): my_tags = [x for (x, y) in self.tags.iteritems() if int(self.metadata[filename]['itemID' ]) in y] if len(my_tags) > 0: self.metadata[filename]['label'] = my_tags[0] else: del self.metadata[filename] self.files.remove(filename) if __name__ == '__main__': try: processor = MalletTagTopics(track_progress=False) processor.process() except: logging.error(traceback.format_exc())
Java
cask 'kanmusmemory' do version '0.15' sha256 'af64ae0846ab0b4366693bc602a81ba7e626bafee820862594c4bcbf92acfcef' url "http://relog.xii.jp/download/kancolle/KanmusuMemory-#{version}-mac.dmg" appcast 'https://github.com/ioriayane/KanmusuMemory/releases.atom', :checkpoint => 'f8cddbd8afc99bff82204851ed915bf9f8246499cc870ee7481ec24135e29faa' name 'KanmusuMemory' homepage 'http://relog.xii.jp/mt5r/2013/08/post-349.html' license :apache app 'KanmusuMemory.app' end
Java
class Zmap < Formula desc "Network scanner for Internet-wide network studies" homepage "https://zmap.io" url "https://github.com/zmap/zmap/archive/v2.1.1.tar.gz" sha256 "29627520c81101de01b0213434adb218a9f1210bfd3f2dcfdfc1f975dbce6399" revision 1 head "https://github.com/zmap/zmap.git" bottle do rebuild 1 sha256 "af12dfa471443be095ccbbb1d0fb8f706e966786d8526b2190f2cfe78f28550c" => :mojave sha256 "d64ac689f0e80bc125a5e4899cc044395b0ba5c75ad365f65a3f6f8a62520137" => :high_sierra sha256 "233f9e5e6964477295c0e9edbf607cd71571155510704124f374934f97eff55c" => :sierra end depends_on "byacc" => :build depends_on "cmake" => :build depends_on "gengetopt" => :build depends_on "pkg-config" => :build depends_on "gmp" depends_on "json-c" depends_on "libdnet" def install inreplace ["conf/zmap.conf", "src/zmap.c", "src/zopt.ggo.in"], "/etc", etc system "cmake", ".", *std_cmake_args, "-DENABLE_DEVELOPMENT=OFF", "-DRESPECT_INSTALL_PREFIX_CONFIG=ON" system "make" system "make", "install" end test do system "#{sbin}/zmap", "--version" end end
Java
import sys import os import subprocess import string printable = set(string.printable) def sanitize(txt): txt = ''.join(filter(lambda c: c in printable, txt)) return txt def traverse(t, outfile): print>>outfile, sanitize(t.code+'\t'+t.description) for c in t.children: traverse(c, outfile) def getEdges(t, outfile): for c in t.children: print >>outfile, sanitize(t.code+'\t'+c.code) getEdges(c, outfile) print 'cloning github repository sirrice/icd9.git' subprocess.call('git clone https://github.com/sirrice/icd9.git', shell=1) sys.path.append('icd9') from icd9 import ICD9 tree = ICD9('icd9/codes.json') toplevelnodes = tree.children print 'creating name file' outfile = file('code.names', 'w') traverse(tree, outfile) outfile.close() print 'creating edges file' outfile = file('code.edges', 'w') getEdges(tree, outfile) outfile.close() print 'cleaning up' #os.chdir('..') #subprocess.call('rm -rf icd9', shell=1)
Java
<?php class GuildWarsMenu extends btThemeMenu { public function __construct($sqlConnection) { parent::__construct("guildwars", $sqlConnection); } public function displayLink() { if($this->intMenuSection == 3) { $menuLinkInfo = $this->menuItemObj->objLink->get_info(); $checkURL = parse_url($menuLinkInfo['link']); if(!isset($checkURL['scheme']) || $checkURL['scheme'] = "") { $menuLinkInfo['link'] = MAIN_ROOT.$menuLinkInfo['link']; } echo "<div style='display: inline-block; vertical-align: middle; height: 50px; padding-right: 20px'><a href='".$menuLinkInfo['link']."' target='".$menuLinkInfo['linktarget']."'>".$menuItemInfo['name']."</a></div>"; } else { parent::displayLink(); } } public function displayMenuCategory($loc="top") { $menuCatInfo = $this->menuCatObj->get_info(); if($loc == "top") { echo $this->getHeaderCode($menuCatInfo); } else { echo "<br>"; } } public function displayLoggedOut() { echo " <form action='".MAIN_ROOT."login.php' method='post' style='padding: 0px; margin: 0px'> <div class='usernameIMG'></div> <div class='usernameTextDiv'> <input name='user' type='text' class='loginTextbox'> </div> <div class='passwordIMG'></div> <div class='passwordTextDiv'> <input name='pass' type='password' class='loginTextbox'> </div> <div class='rememberMeCheckBox' id='fakeRememberMe'></div> <div class='rememberMeIMG'></div> <div id='fakeSubmit' class='loginButton'></div> <input type='checkbox' name='rememberme' value='1' id='realRememberMe' style='display: none'> <input type='submit' name='submit' id='realSubmit' style='display: none' value='Log In'> </form> "; } public function displayLoggedIn() { echo " <div class='loggedInIMG'></div> <div class='loggedInProfilePic'>".$this->memberObj->getProfilePic("45px", "60px")."</div> <div class='loggedInMemberNameIMG'></div> <div class='loggedInMemberNameText'> ".$this->memberObj->getMemberLink(array("color" => "false"))." </div> <div class='loggedInRankIMG'></div> <div class='loggedInRankText'> ".$this->data['memberRank']." </div> <div class='loggedInMemberOptionsSection'> <div class='loggedInMemberOptionsIMG'></div> <div class='loggedInMemberOptions'> <a href='".MAIN_ROOT."members'>My Account</a> - ".$this->data['pmLink']." - <a href='".MAIN_ROOT."members/signout.php'>Sign Out</a><br> </div> </div> "; } } ?>
Java
Changelog ========= 3.x (unreleased) ---------------- * Allow including many templates without reaching recursion limits. Merge of [#787](https://github.com/mozilla/nunjucks/pull/787). Thanks Gleb Khudyakov. * Allow explicitly setting `null` (aka `none`) as the value of a variable; don't ignore that value and look on up the frame stack or context. Fixes [#478](https://github.com/mozilla/nunjucks/issues/478). Thanks Jonny Gerig Meyer for the report. * Execute blocks in a child frame that can't write to its parent. This means that vars set inside blocks will not leak outside of the block, base templates can no longer see vars set in templates that inherit them, and `super()` can no longer set vars in its calling scope. Fixes the inheritance portion of [#561](https://github.com/mozilla/nunjucks/issues/561), which fully closes that issue. Thanks legutierr for the report. * Prevent macros from seeing or affecting their calling scope. Merge of [#667](https://github.com/mozilla/nunjucks/pull/667). * Fix handling of macro arg with default value which shares a name with another macro. Merge of [#791](https://github.com/mozilla/nunjucks/pull/791). 2.x (unreleased) ---------------- * Ensure that precompiling on Windows still outputs POSIX-style path separators. Merge of [#761](https://github.com/mozilla/nunjucks/pull/761). * Add support for strict type check comparisons (=== and !===). Thanks oughter. Merge of [#746](https://github.com/mozilla/nunjucks/pull/746). * Allow full expressions (incl. filters) in import and from tags. Thanks legutierr. Merge of [#710](https://github.com/mozilla/nunjucks/pull/710). 2.4.2 (Apr 15 2016) ------------------- * Fix use of `in` operator with strings. Fixes [#714](https://github.com/mozilla/nunjucks/issues/714). Thanks Zubrik for the report. * Support ES2015 Map and Set in `length` filter. Merge of [#705](https://github.com/mozilla/nunjucks/pull/705). Thanks ricordisamoa. * Remove truncation of long function names in error messages. Thanks Daniel Bendavid. Merge of [#702](https://github.com/mozilla/nunjucks/pull/702). 2.4.1 (Mar 17 2016) ------------------- * Don't double-escape. Thanks legutierr. Merge of [#701](https://github.com/mozilla/nunjucks/pull/701). * Prevent filter.escape from escaping SafeString. Thanks atian25. Merge of [#623](https://github.com/mozilla/nunjucks/pull/623). * Throw an error if a block is defined multiple times. Refs [#696](https://github.com/mozilla/nunjucks/issues/696). * Officially recommend the `.njk` extension. Thanks David Kebler. Merge of [#691](https://github.com/mozilla/nunjucks/pull/691). * Allow block-set to wrap an inheritance block. Unreported; fixed as a side effect of the fix for [#576](https://github.com/mozilla/nunjucks/issues/576). * Fix `filter` tag with non-trivial contents. Thanks Stefan Cruz and Fabien Franzen for report and investigation, Jan Oopkaup for failing tests. Fixes [#576](https://github.com/mozilla/nunjucks/issues/576). 2.4.0 (Mar 10 2016) ------------------- * Allow retrieving boolean-false as a global. Thanks Marius Büscher. Merge of [#694](https://github.com/mozilla/nunjucks/pull/694). * Don't automatically convert any for-loop that has an include statement into an async loop. Reverts [7d4716f4fd](https://github.com/mozilla/nunjucks/commit/7d4716f4fd), re-opens [#372](https://github.com/mozilla/nunjucks/issues/372), fixes [#527](https://github.com/mozilla/nunjucks/issues/527). Thanks Tom Delmas for the report. * Switch from Optimist to Yargs for argument-parsing. Thanks Bogdan Chadkin. Merge of [#672](https://github.com/mozilla/nunjucks/pull/672). * Prevent includes from writing to their including scope. Merge of [#667](https://github.com/mozilla/nunjucks/pull/667) (only partially backported to 2.x; macro var visibility not backported). * Fix handling of `dev` environment option, to get full tracebacks on errors (including nunjucks internals). Thanks Tobias Petry and Chandrasekhar Ambula V for the report, Aleksandr Motsjonov for draft patch. * Support using `in` operator to search in both arrays and objects, and it will throw an error for other data types. Fix [#659](https://github.com/mozilla/nunjucks/pull/659). Thanks Alex Mayfield for report and test, Ouyang Yadong for fix. Merge of [#661](https://github.com/mozilla/nunjucks/pull/661). * Add support for `{% set %}` block assignments as in jinja2. Thanks Daniele Rapagnani. Merge of [#656](https://github.com/mozilla/nunjucks/pull/656) * Fix `{% set %}` scoping within macros. Fixes [#577](https://github.com/mozilla/nunjucks/issues/577) and the macro portion of [#561](https://github.com/mozilla/nunjucks/issues/561). Thanks Ouyang Yadong. Merge of [#653](https://github.com/mozilla/nunjucks/pull/653). * Add support for named `endblock` (e.g. `{% endblock foo %}`). Thanks ricordisamoa. Merge of [#641](https://github.com/mozilla/nunjucks/pull/641). * Fix `range` global with zero as stop-value. Thanks Thomas Hunkapiller. Merge of [#638](https://github.com/mozilla/nunjucks/pull/638). * Fix a bug in urlize that collapsed whitespace. Thanks Paulo Bu. Merge of [#637](https://github.com/mozilla/nunjucks/pull/637). * Add `sum` filter. Thanks Pablo Matías Lazo. Merge of [#629](https://github.com/mozilla/nunjucks/pull/629). * Don't suppress errors inside {% if %} tags. Thanks Artemy Tregubenko for report and test, Ouyang Yadong for fix. Merge of [#634](https://github.com/mozilla/nunjucks/pull/634). * Allow whitespace control on comment blocks, too. Thanks Ouyang Yadong. Merge of [#632](https://github.com/mozilla/nunjucks/pull/632). * Fix whitespace control around nested tags/variables/comments. Thanks Ouyang Yadong. Merge of [#631](https://github.com/mozilla/nunjucks/pull/631). v2.3.0 (Jan 6 2016) ------------------- * Return `null` from `WebLoader` on missing template instead of throwing an error, for consistency with other loaders. This allows `WebLoader` to support the new `ignore missing` flag on the `include` tag. If `ignore missing` is not set, a generic "template not found" error will still be thrown, just like for any other loader. Ajax errors other than 404 will still cause `WebLoader` to throw an error directly. * Add preserve-linebreaks option to `striptags` filter. Thanks Ivan Kleshnin. Merge of [#619](https://github.com/mozilla/nunjucks/pull/619). v2.2.0 (Nov 23 2015) -------------------- * Add `striptags` filter. Thanks Anthony Giniers. Merge of [#589](https://github.com/mozilla/nunjucks/pull/589). * Allow compiled templates to be imported, included and extended. Thanks Luis Gutierrez-Sheris. Merge of [#581](https://github.com/mozilla/nunjucks/pull/581). * Fix issue with different nunjucks environments sharing same globals. Each environment is now independent. Thanks Paul Pechin. Merge of [#574](https://github.com/mozilla/nunjucks/pull/574). * Add negative steps support for range function. Thanks Nikita Mostovoy. Merge of [#575](https://github.com/mozilla/nunjucks/pull/575). * Remove deprecation warning when using the `default` filter without specifying a third argument. Merge of [#567](https://github.com/mozilla/nunjucks/pull/567). * Add support for chaining of addGlobal, addFilter, etc. Thanks Rob Graeber. Merge of [#537](https://github.com/mozilla/nunjucks/pull/537) * Fix error propagation. Thanks Tom Delmas. Merge of [#534](https://github.com/mozilla/nunjucks/pull/534). * trimBlocks now also trims windows style line endings. Thanks Magnus Tovslid. Merge of [#548](https://github.com/mozilla/nunjucks/pull/548) * `include` now supports an option to suppress errors if the template does not exist. Thanks Mathias Nestler. Merge of [#559](https://github.com/mozilla/nunjucks/pull/559) v2.1.0 (Sep 21 2015) -------------------- * Fix creating `WebLoader` without `opts`. Merge of [#524](https://github.com/mozilla/nunjucks/pull/524). * Add `hasExtension` and `removeExtension` methods to `Environment`. Merge of [#512](https://github.com/mozilla/nunjucks/pull/512). * Add support for kwargs in `sort` filter. Merge of [#510](https://github.com/mozilla/nunjucks/pull/510). * Add `none` as a lexed constant evaluating to `null`. Merge of [#480](https://github.com/mozilla/nunjucks/pull/480). * Fix rendering of multiple `raw` blocks. Thanks Aaron O'Mullan. Merge of [#503](https://github.com/mozilla/nunjucks/pull/503). * Avoid crashing on async loader error. Thanks Samy Pessé. Merge of [#504](https://github.com/mozilla/nunjucks/pull/504). * Add support for keyword arguments for sort filter. Thanks Andres Pardini. Merge of [#510](https://github.com/mozilla/nunjucks/pull/510) v2.0.0 (Aug 30 2015) -------------------- Most of the changes can be summed up in the [issues tagged 2.0](https://github.com/mozilla/nunjucks/issues?q=is%3Aissue+milestone%3A2.0+is%3Aclosed). Or you can [see all commits](https://github.com/mozilla/nunjucks/compare/v1.3.4...f8aabccefc31a9ffaccdc6797938b5187e07ea87). Most important changes: * **autoescape is now on by default.** You need to explicitly pass `{ autoescape: false }` in the options to turn it off. * **watch is off by default.** You need to explicitly pass `{ watch: true }` to start the watcher. * The `default` filter has changed. It will show the default value only if the argument is **undefined**. Any other value, even false-y values like `false` and `null`, will be returned. You can get back the old behavior by passing `true` as a 3rd argument to activate the loose-y behavior: `foo | default("bar", true)`. In 2.0 if you don't pass the 3rd argument, a warning will be displayed about this change in behavior. In 2.1 this warning will be removed. * [New filter tag](http://mozilla.github.io/nunjucks/templating.html#filter) * Lots of other bug fixes and small features, view the above issue list! v1.3.4 (Apr 27 2015) -------------------- This is an extremely minor release that only adds an .npmignore so that the bench, tests, and docs folders do not get published to npm. Nunjucks should download a lot faster now. v1.3.3 (Apr 3 2015) ------------------- This is exactly the same as v1.3.1, just fixing a typo in the git version tag. v1.3.2 (Apr 3 2015) ------------------- (no notes) v1.3.1 (Apr 3 2015) ------------------- We added strict mode to all the files, but that broke running nunjucks in the browser. Should work now with this small fix. v1.3.0 (Apr 3 2015) ------------------- * Relative templates: you can now load a template relatively by starting the path with ., like ./foo.html * FileSystemLoader now takes a noCache option, if true will disable caching entirely * Additional lstripBlocks and trimBlocks available to clean output automatically * New selectattr and rejectattr filters * Small fixes to the watcher * Several bug fixes v1.2.0 (Feb 4 2015) ------------------- * The special non-line-breaking space is considered whitespace now * The in operator has a lower precedence now. This is potentially a breaking change, thus the minor version bump. See [#336](https://github.com/mozilla/nunjucks/pull/336) * import with context now implemented: [#319](https://github.com/mozilla/nunjucks/pull/319) * async rendering doesn't throw compile errors v1.1.0 (Sep 30 2014) -------------------- User visible changes: * Fix a bug in urlize that would remove periods * custom tag syntax (like {% and %}) was made Environment-specific internally. Previously they were global even though you set them through the Environment. * Remove aggressive optimization that only emitted loop variables when uses. It introduced several bugs and didn't really improve perf. * Support the regular expression syntax like /foo/g. * The replace filter can take a regex as the first argument * The call tag was implemented * for tags can now take an else clause * The cycler object now exposes the current item as the current property * The chokidar library was updated and should fix various issues Dev changes: * Test coverage now available via istanbul. Will automatically display after running tests. v1.0.7 (Aug 15 2014) -------------------- Mixed up a few things in the 1.0.6 release, so another small bump. This merges in one thing: * The length filter will not throw an error is used on an undefined variable. It will return 0 if the variable is undefined. v1.0.6 (Aug 15 2014) -------------------- * Added the addGlobal method to the Environment object * import/extends/include now can take an arbitrary expression * fix bugs in set * improve express integration (allows rendering templates without an extension) v1.0.5 (May 1 2014) ------------------- * Added support for browserify * Added option to specify template output path when precompiling templates * Keep version comment in browser minified files * Speed up SafeString implementation * Handle null and non-matching cases for word count filter * Added support for node-webkit * Other various minor bugfixes chokidar repo fix - v1.0.4 (Apr 4 2014) --------------------------------------- * The chokidar dependency moved repos, and though the git URL should have been forwarded some people were having issues. This fixed the repo and version. (v1.0.3 is skipped because it was published with a bad URL, quickly fixed with another version bump) Bug fixes - v1.0.2 (Mar 25 2014) -------------------------------- * Use chokidar for watching file changes. This should fix a lot of problems on OS X machines. * Always use / in paths when precompiling templates * Fix bug where async filters hang indefinitely inside if statements * Extensions now can override autoescaping with an autoescape property * Other various minor bugfixes v1.0.1 (Dec 16, 2013) --------------------- (no notes) We've reached 1.0! Better APIs, asynchronous control, and more (Oct 24, 2013) ----------------------------------------------------------------------------- * An asynchronous API is now available, and async filters, extensions, and loaders is supported. The async API is optional and if you don't do anything async (the default), nothing changes for you. You can read more about this [here](http://jlongster.github.io/nunjucks/api.html#asynchronous-support). (fixes [#41](https://github.com/mozilla/nunjucks/issues/41)) * Much simpler higher-level API for initiating/configuring nunjucks is available. Read more [here](http://jlongster.github.io/nunjucks/api.html#simple-api). * An official grunt plugin is available for precompiling templates: [grunt-nunjucks](https://github.com/jlongster/grunt-nunjucks) * **The browser files have been renamed.** nunjucks.js is now the full library with compiler, and nunjucks-slim.js is the small version that only works with precompiled templates * urlencode filter has been added * The express integration has been refactored and isn't a kludge anymore. Should avoid some bugs and be more future-proof; * The order in which variables are lookup up in the context and frame lookup has been reversed. It will now look in the frame first, and then the context. This means that if a for loop introduces a new var, like {% for name in names %}, and if you have name in the context as well, it will properly reference name from the for loop inside the loop. (fixes [#122](https://github.com/mozilla/nunjucks/pull/122) and [#119](https://github.com/mozilla/nunjucks/issues/119)) v0.1.10 (Aug 9 2013) -------------------- (no notes) v0.1.9 (May 30 2013) -------------------- (no notes) v0.1.8 - whitespace controls, unpacking, better errors, and more! (Feb 6 2013) ------------------------------------------------------------------------------ There are lots of cool new features in this release, as well as many critical bug fixes. Full list of changes: * Whitespace control is implemented. Use {%- and -%} to strip whitespace before/after the block. * `for` loops implement Python-style array unpacking. This is a really nice feature which lets you do this: {% for x, y, z in [[2, 2, 2], [3, 3, 3]] %} --{{ x }} {{ y }} {{ z }}-- {% endfor %} The above would output: --2 2 2----3 3 3-- You can pass any number of variable names to for and it will destructure each array in the list to the variables. This makes the syntax between arrays and objects more consistent. Additionally, it allows us to implement the `dictsort` filter which sorts an object by keys or values. Technically, it returns an array of 2-value arrays and the unpacking takes care of it. Example: {% for k, v in { b: 2, a: 1 } %} --{{ k }}: {{ v }}-- {% endfor %} Output: `--b: 2----a: 1--` (note: the order could actually be anything because it uses javascript’s `for k in obj` syntax to iterate, and ordering depends on the js implementation) {% for k, v in { b: 2, a: 1} | dictsort %} --{{ k }}: {{ v }}-- {% endfor %} Output: `--a: 1----b: 2--` The above output will always be ordered that way. See the documentation for more details. Thanks to novocaine for this! * Much better error handling with at runtime (shows template/line/col information for attempting to call undefined values, etc) * Fixed a regression which broke the {% raw %} block * Fix some edge cases with variable lookups * Fix a regression with loading precompiled templates * Tweaks to allow usage with YUICompressor * Use the same error handling as normal when precompiling (shows proper errors) * Fix template loading on Windows machines * Fix int/float filters * Fix regression with super() v0.1.7 - helpful errors, many bug fixes (Dec 12 2012) ----------------------------------------------------- The biggest change in v0.1.7 comes from devoidfury (thanks!) which implements consistent and helpful error messages. The errors are still simply raw text, and not pretty HTML, but they at least contain all the necessary information to track down an error, such as template names, line and column numbers, and the inheritance stack. So if an error happens in a child template, it will print out all the templates that it inherits. In the future, we will most likely display the actual line causing an error. Full list of changes: * Consistent and helpful error messages * Expressions are more consistent now. Previously, there were several places that wouldn’t accept an arbitrary expression that should. For example, you can now do {% include templateNames['foo'] %}, whereas previously you could only give it a simply variable name. * app.locals is fixed with express 2.5 * Method calls on objects now have correct scope for this. Version 0.1.6 broke this and this was referencing the global scope. * A check was added to enforce loading of templates within the correct path. Previously you could load a file outside of the template with something like ../../crazyPrivateFile.txt You can [view all the code changes here](https://github.com/jlongster/nunjucks/compare/v0.1.6...v0.1.7). Please [file an issue](https://github.com/jlongster/nunjucks/issues?page=1&state=open) if something breaks! v0.1.6 - undefined handling, bugfixes (Nov 13, 2012) ---------------------------------------------------- This is mostly a bugfix release, but there are a few small tweaks based on feedback: * In some cases, backslashes in the template would not appear in the output. This has been fixed. * An error is thrown if a filter is not found * Old versions of express are now supported (2.5.11 was tested) * References on undefined objects are now suppressed. For example, {{ foo }}, {{ foo.bar }}, {{ foo.bar.baz }} all output nothing if foo is undefined. Previously only the first form would be suppressed, and a cryptic error thrown for the latter 2 references. Note: I believe this is a departure from jinja, which throws errors when referencing undefined objects. I feel that this is a good and non-breaking addition though. (thanks to devoidfury) * A bug in set where you couldn’t not reference other variables is fixed (thanks chriso and panta) * Other various small bugfixes You can view [all the code changes here](https://github.com/jlongster/nunjucks/compare/v0.1.5...v0.1.6). As always, [file an issue](https://github.com/jlongster/nunjucks/issues) if something breaks! v0.1.5 - macros, keyword arguments, bugfixes (Oct 11 2012) ---------------------------------------------------------- v0.1.5 has been pushed to npm, and it’s a big one. Please file any issues you find, and I’ll fix them as soon as possible! * The node data structure has been completely refactored to reduce redundancy and make it easier to add more types in the future. * Thanks to Brent Hagany, macros now have been implemented. They should act exactly the way jinja2 macros do. * A calling convention which implements keyword arguments now exists. All keyword args are converted into a hash and passed as the last argument. Macros needed this to implement keyword/default arguments. * Function and filter calls apply the new keyword argument calling convention * The “set” block now appropriately only sets a variable for the current scope. * Many other bugfixes. I’m watching this release carefully because of the large amount of code that has changed, so please [file an issue](https://github.com/jlongster/nunjucks/issues) if you have a problem with it.
Java
cask :v1 => 'chunkulus' do version :latest sha256 :no_check url 'http://presstube.com/screensavers/presstube-chunkulus-mac.zip' homepage 'http://presstube.com/blog/2011/chunkulus/' license :unknown # todo: change license and remove this comment; ':unknown' is a machine-generated placeholder screen_saver 'presstube-chunkulus.app/Contents/Resources/Presstube - Chunkulus.saver' postflight do system '/usr/libexec/PlistBuddy', '-c', 'Set :CFBundleName Chunkulus (Presstube)', "#{staged_path}/presstube-chunkulus.app/Contents/Resources/Presstube - Chunkulus.saver/Contents/Info.plist" end caveats <<-EOS.undent #{token} requires Adobe Air, available via brew cask install adobe-air EOS end
Java
// I would prefer this to be delete.lua and load it using NSBundle // But I failed. I don't know why. static const char * deletelua = "" "-- This script receives three parameters, all encoded with\n" "-- MessagePack. The decoded values are used for deleting a model\n" "-- instance in Redis and removing any reference to it in sets\n" "-- (indices) and hashes (unique indices).\n" "--\n" "-- # model\n" "--\n" "-- Table with three attributes:\n" "-- id (model instance id)\n" "-- key (hash where the attributes will be saved)\n" "-- name (model name)\n" "--\n" "-- # uniques\n" "--\n" "-- Fields and values to be removed from the unique indices.\n" "--\n" "-- # tracked\n" "--\n" "-- Keys that share the lifecycle of this model instance, that\n" "-- should be removed as this object is deleted.\n" "--\n" "local model = cmsgpack.unpack(ARGV[1])\n" "local uniques = cmsgpack.unpack(ARGV[2])\n" "local tracked = cmsgpack.unpack(ARGV[3])\n" "\n" "local function remove_indices(model)\n" " local memo = model.key .. \":_indices\"\n" " local existing = redis.call(\"SMEMBERS\", memo)\n" "\n" " for _, key in ipairs(existing) do\n" " redis.call(\"SREM\", key, model.id)\n" " redis.call(\"SREM\", memo, key)\n" " end\n" "end\n" "\n" "local function remove_uniques(model, uniques)\n" " local memo = model.key .. \":_uniques\"\n" "\n" " for field, _ in pairs(uniques) do\n" " local key = model.name .. \":uniques:\" .. field\n" "\n" " local field = redis.call(\"HGET\", memo, key)\n" " if field then\n" " redis.call(\"HDEL\", key, field)\n" " end\n" " redis.call(\"HDEL\", memo, key)\n" " end\n" "end\n" "\n" "local function remove_tracked(model, tracked)\n" " for _, tracked_key in ipairs(tracked) do\n" " local key = model.key .. \":\" .. tracked_key\n" "\n" " redis.call(\"DEL\", key)\n" " end\n" "end\n" "\n" "local function delete(model)\n" " local keys = {\n" " model.key .. \":counters\",\n" " model.key .. \":_indices\",\n" " model.key .. \":_uniques\",\n" " model.key\n" " }\n" "\n" " redis.call(\"SREM\", model.name .. \":all\", model.id)\n" " redis.call(\"DEL\", unpack(keys))\n" "end\n" "\n" "remove_indices(model)\n" "remove_uniques(model, uniques)\n" "remove_tracked(model, tracked)\n" "delete(model)\n" "\n" "return model.id\n";
Java
/* Copyright (c) Citrix Systems, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, * with or without modification, are permitted provided * that the following conditions are met: * * * Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the * following disclaimer in the documentation and/or other * materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ using System; using System.Collections.Generic; using System.IO; using XenAdmin.Network; using XenAdmin.Core; using XenAPI; using XenAdmin.Actions; using XenAdmin; using System.Linq; using System.Globalization; using System.Xml; namespace XenServerHealthCheck { public class XenServerHealthCheckBugTool { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private static readonly List<string> reportExcluded = new List<string> { "blobs", "vncterm", "xapi-debug" }; private static readonly Dictionary<string, int> reportWithVerbosity = new Dictionary<string, int> { {"host-crashdump-logs", 2}, {"system-logs", 2}, {"tapdisk-logs", 2}, {"xapi", 2}, {"xcp-rrdd-plugins", 2}, {"xenserver-install", 2}, {"xenserver-logs", 2} }; public readonly string outputFile; public XenServerHealthCheckBugTool() { string name = string.Format("{0}{1}.zip", Messages.BUGTOOL_FILE_PREFIX, DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss", CultureInfo.InvariantCulture)); string folder = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); if (Directory.Exists(folder)) Directory.Delete(folder); Directory.CreateDirectory(folder); if (!name.EndsWith(".zip")) name = string.Concat(name, ".zip"); outputFile = string.Format(@"{0}\{1}", folder, name); } public void RunBugtool(IXenConnection connection, Session session) { if (connection == null || session == null) return; // Fetch the common capabilities of all hosts. Dictionary<Host, List<string>> hostCapabilities = new Dictionary<Host, List<string>>(); foreach (Host host in connection.Cache.Hosts) { GetSystemStatusCapabilities action = new GetSystemStatusCapabilities(host); action.RunExternal(session); if (!action.Succeeded) return; List<string> keys = new List<string>(); XmlDocument doc = new XmlDocument(); doc.LoadXml(action.Result); foreach (XmlNode node in doc.GetElementsByTagName("capability")) { foreach (XmlAttribute a in node.Attributes) { if (a.Name == "key") keys.Add(a.Value); } } hostCapabilities[host] = keys; } List<string> combination = null; foreach (List<string> capabilities in hostCapabilities.Values) { if (capabilities == null) continue; if (combination == null) { combination = capabilities; continue; } combination = Helpers.ListsCommonItems<string>(combination, capabilities); } if (combination == null || combination.Count <= 0) return; // The list of the reports which are required in Health Check Report. List<string> reportIncluded = combination.Except(reportExcluded).ToList(); // Verbosity works for xen-bugtool since Dundee. if (Helpers.DundeeOrGreater(connection)) { List<string> verbReport = new List<string>(reportWithVerbosity.Keys); int idx = -1; for (int x = 0; x < verbReport.Count; x++) { idx = reportIncluded.IndexOf(verbReport[x]); if (idx >= 0) { reportIncluded[idx] = reportIncluded[idx] + ":" + reportWithVerbosity[verbReport[x]].ToString(); } } } // Ensure downloaded filenames are unique even for hosts with the same hostname: append a counter to the timestring string filepath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); if (Directory.Exists(filepath)) Directory.Delete(filepath); Directory.CreateDirectory(filepath); string timestring = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"); // Collect all master/slave information to output as a separate text file with the report List<string> mastersInfo = new List<string>(); int i = 0; Pool p = Helpers.GetPool(connection); foreach (Host host in connection.Cache.Hosts) { // master/slave information if (p == null) { mastersInfo.Add(string.Format("Server '{0}' is a stand alone server", host.Name())); } else { mastersInfo.Add(string.Format("Server '{0}' is a {1} of pool '{2}'", host.Name(), p.master.opaque_ref == host.opaque_ref ? "master" : "slave", p.Name())); } HostWithStatus hostWithStatus = new HostWithStatus(host, 0); SingleHostStatusAction statAction = new SingleHostStatusAction(hostWithStatus, reportIncluded, filepath, timestring + "-" + ++i); statAction.RunExternal(session); } // output the slave/master info string mastersDestination = string.Format("{0}\\{1}-Masters.txt", filepath, timestring); WriteExtraInfoToFile(mastersInfo, mastersDestination); // output the XenCenter metadata var metadata = XenAdminConfigManager.Provider.GetXenCenterMetadata(false); string metadataDestination = string.Format("{0}\\{1}-Metadata.json", filepath, timestring); WriteExtraInfoToFile(new List<string> {metadata}, metadataDestination); // Finish the collection of logs with bugtool. // Start to zip the files. ZipStatusReportAction zipAction = new ZipStatusReportAction(filepath, outputFile); zipAction.RunExternal(session); log.InfoFormat("Server Status Report is collected: {0}", outputFile); } private void WriteExtraInfoToFile(List<string> info, string fileName) { if (File.Exists(fileName)) File.Delete(fileName); StreamWriter sw = null; try { sw = new StreamWriter(fileName); foreach (string s in info) sw.WriteLine(s); sw.Flush(); } catch (Exception e) { log.ErrorFormat("Exception while writing {0} file: {1}", fileName, e); } finally { if (sw != null) sw.Close(); } } } }
Java
class PureFtpd < Formula desc "Secure and efficient FTP server" homepage "https://www.pureftpd.org/" url "https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.49.tar.gz" sha256 "767bf458c70b24f80c0bb7a1bbc89823399e75a0a7da141d30051a2b8cc892a5" revision 1 bottle do cellar :any sha256 "aa0a342b50ae3761120370fc0e6605241e03545441c472d778ef030239784454" => :catalina sha256 "e3a63b9af91de3c29eef40a76d7962cdf8623a8e8992aeb67bdf3948293c450d" => :mojave sha256 "a6a9549f3d8bde87cf01210e9fa29b403ed258246a7928d195a57f0c5ace6988" => :high_sierra sha256 "11dfcec52ae727128c8201a4779fc7feea1d547fe86989a621d4ba339f70de92" => :sierra end depends_on "libsodium" depends_on "[email protected]" def install args = %W[ --disable-dependency-tracking --prefix=#{prefix} --mandir=#{man} --sysconfdir=#{etc} --with-everything --with-pam --with-tls --with-bonjour ] system "./configure", *args system "make", "install" end plist_options manual: "pure-ftpd" def plist <<~EOS <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <true/> <key>Label</key> <string>#{plist_name}</string> <key>ProgramArguments</key> <array> <string>#{opt_sbin}/pure-ftpd</string> <string>--chrooteveryone</string> <string>--createhomedir</string> <string>--allowdotfiles</string> <string>--login=puredb:#{etc}/pureftpd.pdb</string> </array> <key>RunAtLoad</key> <true/> <key>WorkingDirectory</key> <string>#{var}</string> <key>StandardErrorPath</key> <string>#{var}/log/pure-ftpd.log</string> <key>StandardOutPath</key> <string>#{var}/log/pure-ftpd.log</string> </dict> </plist> EOS end test do system bin/"pure-pw", "--help" end end
Java
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>DbSync: DbSync_DbAdapter_AdapterInterface Interface Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body onload='searchBox.OnSelectItem(0);'> <!-- Generated by Doxygen 1.7.4 --> <script type="text/javascript"><!-- var searchBox = new SearchBox("searchBox", "search",false,'Search'); --></script> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">DbSync</div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li id="searchli"> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <div class="title">DbSync_DbAdapter_AdapterInterface Interface Reference</div> </div> </div> <div class="contents"> <!-- doxytag: class="DbSync_DbAdapter_AdapterInterface" --><div class="dynheader"> Inheritance diagram for DbSync_DbAdapter_AdapterInterface:</div> <div class="dyncontent"> <div class="center"> <img src="interfaceDbSync__DbAdapter__AdapterInterface.png" usemap="#DbSync_DbAdapter_AdapterInterface_map" alt=""/> <map id="DbSync_DbAdapter_AdapterInterface_map" name="DbSync_DbAdapter_AdapterInterface_map"> <area href="classDbSync__DbAdapter__Mysql.html" alt="DbSync_DbAdapter_Mysql" shape="rect" coords="0,56,227,80"/> </map> </div></div> <p><a href="interfaceDbSync__DbAdapter__AdapterInterface-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#a29aeee3cbdac7e08ca3c08f464f5b443">__construct</a> (array $config)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#a683e550d89b21e02e4068993f30079fc">parseSchema</a> ($tableName)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#acc0350206ef7c623402bb19633ad3f6a">createAlter</a> ($config, $tableName)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#acea54c81f65be6ea4eceb8dcf3b93659">parseTrigger</a> ($triggerName)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#a2efd82563860bf45fc07fbeb4d67b056">createTriggerSql</a> ($config)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#a4e19047119e11123e47f8c8c14e0c665">execute</a> ($sql)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#a686c3e752907a09cc1d87fce2d2bb101">getTriggerList</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#a6df405111c98ca40324423f8981d7974">getTableByTrigger</a> ($triggerName)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#a84b87f76dc8ebc123d42dda7393e0cb9">getTableList</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#ac1cb4888b127b104ed231feae87d3056">hasTable</a> ($tableName)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#aa8f4119b6cc6cf5bfd0d97d45a849d9d">hasTrigger</a> ($triggerName)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#ad60b6d7e34fba4e763132e47134b35e1">fetchData</a> ($tableName)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#ad535c5d4d074383feb578fab1e71d2e7">insert</a> ($data, $tableName)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#a06dfb3597de81841661535373ce06e0d">merge</a> ($data, $tableName)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#a2cc0eb5ae7c4aa0b69a899e84040da83">truncate</a> ($tableName)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#a18ccca4e55a874ed85acd00506f4fff2">dropTable</a> ($tableName)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#afb0b32f718a3a499955444966929997b">dropTrigger</a> ($triggerName)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="interfaceDbSync__DbAdapter__AdapterInterface.html#abe0d20fb62067de68fb354adc3eb7e8a">isEmpty</a> ($tableName)</td></tr> </table> <hr/><h2>Constructor &amp; Destructor Documentation</h2> <a class="anchor" id="a29aeee3cbdac7e08ca3c08f464f5b443"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::__construct" ref="a29aeee3cbdac7e08ca3c08f464f5b443" args="(array $config)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::__construct </td> <td>(</td> <td class="paramtype">array $&#160;</td> <td class="paramname"><em>config</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Constructor</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramtype">array</td><td class="paramname">$config</td><td></td></tr> </table> </dd> </dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#abf098ec8f68514927dacce23e5a30030">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="acc0350206ef7c623402bb19633ad3f6a"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::createAlter" ref="acc0350206ef7c623402bb19633ad3f6a" args="($config, $tableName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::createAlter </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>config</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>tableName</em>&#160;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Generate Alter Table</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramtype">array</td><td class="paramname">$config</td><td></td></tr> <tr><td class="paramtype">string</td><td class="paramname">$tableName</td><td></td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>string </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#a51b9a8196dcbef50547417d4fe8a0666">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="a2efd82563860bf45fc07fbeb4d67b056"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::createTriggerSql" ref="a2efd82563860bf45fc07fbeb4d67b056" args="($config)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::createTriggerSql </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>config</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Generate trigger sql</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramtype">array</td><td class="paramname">$config</td><td></td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>string </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#af58ff620be0d1f4cac9b865ca0000fcf">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="a18ccca4e55a874ed85acd00506f4fff2"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::dropTable" ref="a18ccca4e55a874ed85acd00506f4fff2" args="($tableName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::dropTable </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>tableName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Drop table</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramtype">string</td><td class="paramname">$tableName</td><td></td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>number </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#a95bec76ffdfe365cc68a682724443488">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="afb0b32f718a3a499955444966929997b"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::dropTrigger" ref="afb0b32f718a3a499955444966929997b" args="($triggerName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::dropTrigger </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>triggerName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Drop trigger</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramtype">string</td><td class="paramname">$triggerName</td><td></td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>number </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#a9a98e8e32ececd6cc3b101d5cc87fa4f">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="a4e19047119e11123e47f8c8c14e0c665"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::execute" ref="a4e19047119e11123e47f8c8c14e0c665" args="($sql)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::execute </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>sql</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Execute sql query</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramtype">string</td><td class="paramname">$sql</td><td></td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>integer </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#a279036935ed06d1cd41c4ec1d8b107cc">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="ad60b6d7e34fba4e763132e47134b35e1"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::fetchData" ref="ad60b6d7e34fba4e763132e47134b35e1" args="($tableName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::fetchData </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>tableName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Fetch all data from table</p> <dl class="return"><dt><b>Returns:</b></dt><dd>array </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#a76d3e3c3e80fee76c7057724a55a8d58">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="a6df405111c98ca40324423f8981d7974"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::getTableByTrigger" ref="a6df405111c98ca40324423f8981d7974" args="($triggerName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::getTableByTrigger </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>triggerName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Get table name by trigger name</p> <dl class="return"><dt><b>Returns:</b></dt><dd>string </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#a1bb1fb6762c987d2bdcd243c37875a54">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="a84b87f76dc8ebc123d42dda7393e0cb9"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::getTableList" ref="a84b87f76dc8ebc123d42dda7393e0cb9" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::getTableList </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Get tables list</p> <dl class="return"><dt><b>Returns:</b></dt><dd>array </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#ab6a45a23420b3f1e5817fbe287c53842">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="a686c3e752907a09cc1d87fce2d2bb101"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::getTriggerList" ref="a686c3e752907a09cc1d87fce2d2bb101" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::getTriggerList </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Get triggers list</p> <dl class="return"><dt><b>Returns:</b></dt><dd>array </dd></dl> </div> </div> <a class="anchor" id="ac1cb4888b127b104ed231feae87d3056"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::hasTable" ref="ac1cb4888b127b104ed231feae87d3056" args="($tableName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::hasTable </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>tableName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Is db table exists</p> <dl class="return"><dt><b>Returns:</b></dt><dd>boolen </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#aceee5101dd14398aa51b7f3abfe88306">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="aa8f4119b6cc6cf5bfd0d97d45a849d9d"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::hasTrigger" ref="aa8f4119b6cc6cf5bfd0d97d45a849d9d" args="($triggerName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::hasTrigger </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>triggerName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Is db trigger exists</p> <dl class="return"><dt><b>Returns:</b></dt><dd>boolen </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#a7c89b938e8554a37e1244207cb75b3ff">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="ad535c5d4d074383feb578fab1e71d2e7"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::insert" ref="ad535c5d4d074383feb578fab1e71d2e7" args="($data, $tableName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::insert </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>data</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>tableName</em>&#160;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Push data to db table</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramtype">boolen</td><td class="paramname">$force</td><td></td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>boolen </dd></dl> <dl><dt><b>Exceptions:</b></dt><dd> <table class="exception"> <tr><td class="paramname">Exception</td><td></td></tr> </table> </dd> </dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#a5f9f2976276f71419539cb1da154f5de">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="abe0d20fb62067de68fb354adc3eb7e8a"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::isEmpty" ref="abe0d20fb62067de68fb354adc3eb7e8a" args="($tableName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::isEmpty </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>tableName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Is db table empty</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramtype">string</td><td class="paramname">$tableName</td><td></td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>boolean </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#ab8b4ba488780a70e219b04cb893549df">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="a06dfb3597de81841661535373ce06e0d"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::merge" ref="a06dfb3597de81841661535373ce06e0d" args="($data, $tableName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::merge </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>data</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>tableName</em>&#160;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Merge data to db table</p> <dl><dt><b>Exceptions:</b></dt><dd> <table class="exception"> <tr><td class="paramname">Exception</td><td></td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>boolean </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#a8a92a7e594687733c08bacd9d4217521">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="a683e550d89b21e02e4068993f30079fc"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::parseSchema" ref="a683e550d89b21e02e4068993f30079fc" args="($tableName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::parseSchema </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>tableName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Parse schema</p> <dl class="return"><dt><b>Returns:</b></dt><dd>array </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#a1eeb0ab74018b405fdd42ba5c37adc2d">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="acea54c81f65be6ea4eceb8dcf3b93659"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::parseTrigger" ref="acea54c81f65be6ea4eceb8dcf3b93659" args="($triggerName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::parseTrigger </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>triggerName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Fetch db triggers</p> <dl class="return"><dt><b>Returns:</b></dt><dd>string </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#acf8d25625a74af2fe9f31e4b621ef0f0">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <a class="anchor" id="a2cc0eb5ae7c4aa0b69a899e84040da83"></a><!-- doxytag: member="DbSync_DbAdapter_AdapterInterface::truncate" ref="a2cc0eb5ae7c4aa0b69a899e84040da83" args="($tableName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DbSync_DbAdapter_AdapterInterface::truncate </td> <td>(</td> <td class="paramtype">$&#160;</td> <td class="paramname"><em>tableName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Truncate table</p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramtype">string</td><td class="paramname">$tableName</td><td></td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>number </dd></dl> <p>Implemented in <a class="el" href="classDbSync__DbAdapter__Mysql.html#afb653194c5832eb8205adb4fe13a35db">DbSync_DbAdapter_Mysql</a>.</p> </div> </div> <hr/>The documentation for this interface was generated from the following file:<ul> <li>DbSync/DbAdapter/AdapterInterface.php</li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr class="footer"/><address class="footer"><small>Generated on Thu Nov 3 2011 03:55:10 for DbSync by&#160; <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address> </body> </html>
Java
<?php $service_doc['departamentos|departments'] = array( 'en' => array ( 'pattern' => '/ubigeo/departments', 'description' => 'Lists the ubigeo codes for all departments', ), 'es' => array( 'patron' => '/ubigeo/departamentos', 'descripción' => 'Lista los códigos de ubigeo de todos los departamentos', ) ); $fdepas = function () use ($app, $db) { $res = get_from_cache('departamentos'); if ($res === false) { $stmt = $db->query("select * from ubigeo where nombreCompleto like '%//'"); $res = $stmt->fetchAll(); save_to_cache('departamentos', $res); } echo json_encode(array( $app->request()->getResourceUri() => $res )); }; $app->get('/ubigeo/departamentos', $fdepas)->name('departamentos'); $app->get('/ubigeo/departments', $fdepas)->name('departments');
Java
#!/usr/bin/env python """Bootstrap setuptools installation To use setuptools in your package's setup.py, include this file in the same directory and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() To require a specific version of setuptools, set a download mirror, or use an alternate download directory, simply supply the appropriate options to ``use_setuptools()``. This file can also be run as a script to install or upgrade setuptools. """ import os import shutil import sys import tempfile import zipfile import optparse import subprocess import platform import textwrap import contextlib from distutils import log try: # noinspection PyCompatibility from urllib.request import urlopen except ImportError: # noinspection PyCompatibility from urllib2 import urlopen try: from site import USER_SITE except ImportError: USER_SITE = None DEFAULT_VERSION = "7.0" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): """ Return True if the command succeeded. """ args = (sys.executable,) + args return subprocess.call(args) == 0 def _install(archive_filename, install_args=()): with archive_context(archive_filename): # installing log.warn('Installing Setuptools') if not _python_cmd('setup.py', 'install', *install_args): log.warn('Something went wrong during the installation.') log.warn('See the error message above.') # exitcode will be 2 return 2 def _build_egg(egg, archive_filename, to_dir): with archive_context(archive_filename): # building an egg log.warn('Building a Setuptools egg in %s', to_dir) _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) # returning the result log.warn(egg) if not os.path.exists(egg): raise IOError('Could not build the egg.') class ContextualZipFile(zipfile.ZipFile): """ Supplement ZipFile class to support context manager for Python 2.6 """ def __enter__(self): return self def __exit__(self, type, value, traceback): self.close() def __new__(cls, *args, **kwargs): """ Construct a ZipFile or ContextualZipFile as appropriate """ if hasattr(zipfile.ZipFile, '__exit__'): return zipfile.ZipFile(*args, **kwargs) return super(ContextualZipFile, cls).__new__(cls) @contextlib.contextmanager def archive_context(filename): # extracting the archive tmpdir = tempfile.mkdtemp() log.warn('Extracting in %s', tmpdir) old_wd = os.getcwd() try: os.chdir(tmpdir) with ContextualZipFile(filename) as archive: archive.extractall() # going in the directory subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) os.chdir(subdir) log.warn('Now working in %s', subdir) yield finally: os.chdir(old_wd) shutil.rmtree(tmpdir) def _do_download(version, download_base, to_dir, download_delay): egg = os.path.join(to_dir, 'setuptools-%s-py%d.%d.egg' % (version, sys.version_info[0], sys.version_info[1])) if not os.path.exists(egg): archive = download_setuptools(version, download_base, to_dir, download_delay) _build_egg(egg, archive, to_dir) sys.path.insert(0, egg) # Remove previously-imported pkg_resources if present (see # https://bitbucket.org/pypa/setuptools/pull-request/7/ for details). if 'pkg_resources' in sys.modules: del sys.modules['pkg_resources'] import setuptools setuptools.bootstrap_install_from = egg def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, download_delay=15): to_dir = os.path.abspath(to_dir) rep_modules = 'pkg_resources', 'setuptools' imported = set(sys.modules).intersection(rep_modules) try: import pkg_resources except ImportError: return _do_download(version, download_base, to_dir, download_delay) try: pkg_resources.require("setuptools>=" + version) return except pkg_resources.DistributionNotFound: return _do_download(version, download_base, to_dir, download_delay) except pkg_resources.VersionConflict as VC_err: if imported: msg = textwrap.dedent(""" The required version of setuptools (>={version}) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U setuptools'. (Currently using {VC_err.args[0]!r}) """).format(VC_err=VC_err, version=version) sys.stderr.write(msg) sys.exit(2) # otherwise, reload ok del pkg_resources, sys.modules['pkg_resources'] return _do_download(version, download_base, to_dir, download_delay) def _clean_check(cmd, target): """ Run the command to download target. If the command fails, clean up before re-raising the error. """ try: subprocess.check_call(cmd) except subprocess.CalledProcessError: if os.access(target, os.F_OK): os.unlink(target) raise def download_file_powershell(url, target): """ Download the file at url to target using Powershell (which will validate trust). Raise an exception if the command cannot complete. """ target = os.path.abspath(target) ps_cmd = ( "[System.Net.WebRequest]::DefaultWebProxy.Credentials = " "[System.Net.CredentialCache]::DefaultCredentials; " "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" % vars() ) cmd = [ 'powershell', '-Command', ps_cmd, ] _clean_check(cmd, target) def has_powershell(): if platform.system() != 'Windows': return False cmd = ['powershell', '-Command', 'echo test'] with open(os.path.devnull, 'wb') as devnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except Exception: return False return True download_file_powershell.viable = has_powershell def download_file_curl(url, target): cmd = ['curl', url, '--silent', '--output', target] _clean_check(cmd, target) def has_curl(): cmd = ['curl', '--version'] with open(os.path.devnull, 'wb') as devnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except Exception: return False return True download_file_curl.viable = has_curl def download_file_wget(url, target): cmd = ['wget', url, '--quiet', '--output-document', target] _clean_check(cmd, target) def has_wget(): cmd = ['wget', '--version'] with open(os.path.devnull, 'wb') as devnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except Exception: return False return True download_file_wget.viable = has_wget def download_file_insecure(url, target): """ Use Python to download the file, even though it cannot authenticate the connection. """ src = urlopen(url) try: # Read all the data in one block. data = src.read() finally: src.close() # Write all the data in one block to avoid creating a partial file. with open(target, "wb") as dst: dst.write(data) download_file_insecure.viable = lambda: True def get_best_downloader(): downloaders = ( download_file_powershell, download_file_curl, download_file_wget, download_file_insecure, ) viable_downloaders = (dl for dl in downloaders if dl.viable()) return next(viable_downloaders, None) def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, delay=15, downloader_factory=get_best_downloader): """ Download setuptools from a specified location and return its filename `version` should be a valid setuptools version number that is available as an sdist for download under the `download_base` URL (which should end with a '/'). `to_dir` is the directory where the egg will be downloaded. `delay` is the number of seconds to pause before an actual download attempt. ``downloader_factory`` should be a function taking no arguments and returning a function for downloading a URL to a target. """ # making sure we use the absolute path to_dir = os.path.abspath(to_dir) zip_name = "setuptools-%s.zip" % version url = download_base + zip_name saveto = os.path.join(to_dir, zip_name) if not os.path.exists(saveto): # Avoid repeated downloads log.warn("Downloading %s", url) downloader = downloader_factory() downloader(url, saveto) return os.path.realpath(saveto) def _build_install_args(options): """ Build the arguments to 'python setup.py install' on the setuptools package """ return ['--user'] if options.user_install else [] def _parse_args(): """ Parse the command line for options """ parser = optparse.OptionParser() parser.add_option( '--user', dest='user_install', action='store_true', default=False, help='install in user site package (requires Python 2.6 or later)') parser.add_option( '--download-base', dest='download_base', metavar="URL", default=DEFAULT_URL, help='alternative URL from where to download the setuptools package') parser.add_option( '--insecure', dest='downloader_factory', action='store_const', const=lambda: download_file_insecure, default=get_best_downloader, help='Use internal, non-validating downloader' ) parser.add_option( '--version', help="Specify which version to download", default=DEFAULT_VERSION, ) options, args = parser.parse_args() # positional arguments are ignored return options def main(): """Install or upgrade setuptools and EasyInstall""" options = _parse_args() archive = download_setuptools( version=options.version, download_base=options.download_base, downloader_factory=options.downloader_factory, ) return _install(archive, _build_install_args(options)) if __name__ == '__main__': sys.exit(main())
Java
import sys import unittest from streamlink.plugin.api.utils import itertags def unsupported_versions_1979(): """Unsupported python versions for itertags 3.7.0 - 3.7.2 and 3.8.0a1 - https://github.com/streamlink/streamlink/issues/1979 - https://bugs.python.org/issue34294 """ v = sys.version_info if (v.major == 3) and ( # 3.7.0 - 3.7.2 (v.minor == 7 and v.micro <= 2) # 3.8.0a1 or (v.minor == 8 and v.micro == 0 and v.releaselevel == 'alpha' and v.serial <= 1) ): return True else: return False class TestPluginUtil(unittest.TestCase): test_html = """ <!doctype html> <html lang="en" class="no-js"> <title>Title</title> <meta property="og:type" content= "website" /> <meta property="og:url" content="http://test.se/"/> <meta property="og:site_name" content="Test" /> <script src="https://test.se/test.js"></script> <link rel="stylesheet" type="text/css" href="https://test.se/test.css"> <script>Tester.ready(function () { alert("Hello, world!"); });</script> <p> <a href="http://test.se/foo">bar</a> </p> </html> """ # noqa: W291 def test_itertags_single_text(self): title = list(itertags(self.test_html, "title")) self.assertTrue(len(title), 1) self.assertEqual(title[0].tag, "title") self.assertEqual(title[0].text, "Title") self.assertEqual(title[0].attributes, {}) def test_itertags_attrs_text(self): script = list(itertags(self.test_html, "script")) self.assertTrue(len(script), 2) self.assertEqual(script[0].tag, "script") self.assertEqual(script[0].text, "") self.assertEqual(script[0].attributes, {"src": "https://test.se/test.js"}) self.assertEqual(script[1].tag, "script") self.assertEqual(script[1].text.strip(), """Tester.ready(function () {\nalert("Hello, world!"); });""") self.assertEqual(script[1].attributes, {}) @unittest.skipIf(unsupported_versions_1979(), "python3.7 issue, see bpo-34294") def test_itertags_multi_attrs(self): metas = list(itertags(self.test_html, "meta")) self.assertTrue(len(metas), 3) self.assertTrue(all(meta.tag == "meta" for meta in metas)) self.assertEqual(metas[0].text, None) self.assertEqual(metas[1].text, None) self.assertEqual(metas[2].text, None) self.assertEqual(metas[0].attributes, {"property": "og:type", "content": "website"}) self.assertEqual(metas[1].attributes, {"property": "og:url", "content": "http://test.se/"}) self.assertEqual(metas[2].attributes, {"property": "og:site_name", "content": "Test"}) def test_multi_line_a(self): anchor = list(itertags(self.test_html, "a")) self.assertTrue(len(anchor), 1) self.assertEqual(anchor[0].tag, "a") self.assertEqual(anchor[0].text, "bar") self.assertEqual(anchor[0].attributes, {"href": "http://test.se/foo"}) @unittest.skipIf(unsupported_versions_1979(), "python3.7 issue, see bpo-34294") def test_no_end_tag(self): links = list(itertags(self.test_html, "link")) self.assertTrue(len(links), 1) self.assertEqual(links[0].tag, "link") self.assertEqual(links[0].text, None) self.assertEqual(links[0].attributes, {"rel": "stylesheet", "type": "text/css", "href": "https://test.se/test.css"}) def test_tag_inner_tag(self): links = list(itertags(self.test_html, "p")) self.assertTrue(len(links), 1) self.assertEqual(links[0].tag, "p") self.assertEqual(links[0].text.strip(), '<a \nhref="http://test.se/foo">bar</a>') self.assertEqual(links[0].attributes, {})
Java
import { inject, injectable } from 'inversify'; import { ServiceIdentifiers } from '../../../container/ServiceIdentifiers'; import * as ESTree from 'estree'; import { TNodeWithStatements } from '../../../types/node/TNodeWithStatements'; import { TObjectExpressionKeysTransformerCustomNodeFactory } from '../../../types/container/custom-nodes/TObjectExpressionKeysTransformerCustomNodeFactory'; import { IObjectExpressionExtractorResult } from '../../../interfaces/node-transformers/converting-transformers/object-expression-extractors/IObjectExpressionExtractorResult'; import { TStatement } from '../../../types/node/TStatement'; import { ICustomNode } from '../../../interfaces/custom-nodes/ICustomNode'; import { TInitialData } from '../../../types/TInitialData'; import { IObjectExpressionExtractor } from '../../../interfaces/node-transformers/converting-transformers/object-expression-extractors/IObjectExpressionExtractor'; import { ObjectExpressionKeysTransformerCustomNode } from '../../../enums/custom-nodes/ObjectExpressionKeysTransformerCustomNode'; import { ObjectExpressionVariableDeclarationHostNode } from '../../../custom-nodes/object-expression-keys-transformer-nodes/ObjectExpressionVariableDeclarationHostNode'; import { NodeAppender } from '../../../node/NodeAppender'; import { NodeGuards } from '../../../node/NodeGuards'; import { NodeStatementUtils } from '../../../node/NodeStatementUtils'; import { NodeUtils } from '../../../node/NodeUtils'; import { TNodeWithLexicalScope } from '../../../types/node/TNodeWithLexicalScope'; import { NodeLexicalScopeUtils } from '../../../node/NodeLexicalScopeUtils'; @injectable() export class ObjectExpressionToVariableDeclarationExtractor implements IObjectExpressionExtractor { /** * @type {TObjectExpressionKeysTransformerCustomNodeFactory} */ private readonly objectExpressionKeysTransformerCustomNodeFactory: TObjectExpressionKeysTransformerCustomNodeFactory; /** * @param {TObjectExpressionKeysTransformerCustomNodeFactory} objectExpressionKeysTransformerCustomNodeFactory */ public constructor ( @inject(ServiceIdentifiers.Factory__IObjectExpressionKeysTransformerCustomNode) objectExpressionKeysTransformerCustomNodeFactory: TObjectExpressionKeysTransformerCustomNodeFactory, ) { this.objectExpressionKeysTransformerCustomNodeFactory = objectExpressionKeysTransformerCustomNodeFactory; } /** * extracts object expression: * var object = { * foo: 1, * bar: 2 * }; * * to: * var _0xabc123 = { * foo: 1, * bar: 2 * }; * var object = _0xabc123; * * @param {ObjectExpression} objectExpressionNode * @param {Statement} hostStatement * @returns {IObjectExpressionExtractorResult} */ public extract ( objectExpressionNode: ESTree.ObjectExpression, hostStatement: ESTree.Statement ): IObjectExpressionExtractorResult { return this.transformObjectExpressionToVariableDeclaration( objectExpressionNode, hostStatement ); } /** * @param {ObjectExpression} objectExpressionNode * @param {Statement} hostStatement * @returns {Node} */ private transformObjectExpressionToVariableDeclaration ( objectExpressionNode: ESTree.ObjectExpression, hostStatement: ESTree.Statement ): IObjectExpressionExtractorResult { const hostNodeWithStatements: TNodeWithStatements = NodeStatementUtils.getScopeOfNode(hostStatement); const lexicalScopeNode: TNodeWithLexicalScope | null = NodeGuards.isNodeWithLexicalScope(hostNodeWithStatements) ? hostNodeWithStatements : NodeLexicalScopeUtils.getLexicalScope(hostNodeWithStatements) ?? null; if (!lexicalScopeNode) { throw new Error('Cannot find lexical scope node for the host statement node'); } const properties: (ESTree.Property | ESTree.SpreadElement)[] = objectExpressionNode.properties; const newObjectExpressionHostStatement: ESTree.VariableDeclaration = this.getObjectExpressionHostNode( lexicalScopeNode, properties ); const statementsToInsert: TStatement[] = [newObjectExpressionHostStatement]; NodeAppender.insertBefore(hostNodeWithStatements, statementsToInsert, hostStatement); NodeUtils.parentizeAst(newObjectExpressionHostStatement); NodeUtils.parentizeNode(newObjectExpressionHostStatement, hostNodeWithStatements); const newObjectExpressionIdentifier: ESTree.Identifier = this.getObjectExpressionIdentifierNode(newObjectExpressionHostStatement); const newObjectExpressionNode: ESTree.ObjectExpression = this.getObjectExpressionNode(newObjectExpressionHostStatement); return { nodeToReplace: newObjectExpressionIdentifier, objectExpressionHostStatement: newObjectExpressionHostStatement, objectExpressionNode: newObjectExpressionNode }; } /** * @param {TNodeWithLexicalScope} lexicalScopeNode * @param {(Property | SpreadElement)[]} properties * @returns {VariableDeclaration} */ private getObjectExpressionHostNode ( lexicalScopeNode: TNodeWithLexicalScope, properties: (ESTree.Property | ESTree.SpreadElement)[] ): ESTree.VariableDeclaration { const variableDeclarationHostNodeCustomNode: ICustomNode<TInitialData<ObjectExpressionVariableDeclarationHostNode>> = this.objectExpressionKeysTransformerCustomNodeFactory( ObjectExpressionKeysTransformerCustomNode.ObjectExpressionVariableDeclarationHostNode ); variableDeclarationHostNodeCustomNode.initialize(lexicalScopeNode, properties); const statementNode: TStatement = variableDeclarationHostNodeCustomNode.getNode()[0]; if ( !statementNode || !NodeGuards.isVariableDeclarationNode(statementNode) ) { throw new Error('`objectExpressionHostCustomNode.getNode()[0]` should returns array with `VariableDeclaration` node'); } return statementNode; } /** * @param {VariableDeclaration} objectExpressionHostNode * @returns {Identifier} */ private getObjectExpressionIdentifierNode (objectExpressionHostNode: ESTree.VariableDeclaration): ESTree.Identifier { const newObjectExpressionIdentifierNode: ESTree.Pattern = objectExpressionHostNode.declarations[0].id; if (!NodeGuards.isIdentifierNode(newObjectExpressionIdentifierNode)) { throw new Error('`objectExpressionHostNode` should contain `VariableDeclarator` node with `Identifier` id property'); } return newObjectExpressionIdentifierNode; } /** * @param {VariableDeclaration} objectExpressionHostNode * @returns {Identifier} */ private getObjectExpressionNode (objectExpressionHostNode: ESTree.VariableDeclaration): ESTree.ObjectExpression { const newObjectExpressionNode: ESTree.Expression | null = objectExpressionHostNode.declarations[0].init ?? null; if (!newObjectExpressionNode || !NodeGuards.isObjectExpressionNode(newObjectExpressionNode)) { throw new Error('`objectExpressionHostNode` should contain `VariableDeclarator` node with `ObjectExpression` init property'); } return newObjectExpressionNode; } }
Java
# $FreeBSD: soc2013/dpl/head/usr.sbin/nfsdumpstate/Makefile 192854 2009-05-26 15:19:04Z rmacklem $ PROG= nfsdumpstate MAN= nfsdumpstate.8 .include <bsd.prog.mk>
Java
function(modal) { function ajaxifyLinks (context) { $('a.address-choice', context).click(function() { modal.loadUrl(this.href); return false; }); $('.pagination a', context).click(function() { var page = this.getAttribute("data-page"); setPage(page); return false; }); }; var searchUrl = $('form.address-search', modal.body).attr('action') function search() { $.ajax({ url: searchUrl, data: {q: $('#id_q').val()}, success: function(data, status) { $('#search-results').html(data); ajaxifyLinks($('#search-results')); } }); return false; }; function setPage(page) { if($('#id_q').val().length){ dataObj = {q: $('#id_q').val(), p: page}; } else { dataObj = {p: page}; } $.ajax({ url: searchUrl, data: dataObj, success: function(data, status) { $('#search-results').html(data); ajaxifyLinks($('#search-results')); } }); return false; } ajaxifyLinks(modal.body); function submitForm() { var formdata = new FormData(this); $.ajax({ url: this.action, data: formdata, processData: false, contentType: false, type: 'POST', dataType: 'text', success: function(response){ modal.loadResponseText(response); } }); return false; } $('form.address-create', modal.body).submit(submitForm); $('form.address-edit', modal.body).submit(submitForm); $('form.address-search', modal.body).submit(search); $('#id_q').on('input', function() { clearTimeout($.data(this, 'timer')); var wait = setTimeout(search, 50); $(this).data('timer', wait); }); {% url 'wagtailadmin_tag_autocomplete' as autocomplete_url %} $('#id_tags', modal.body).tagit({ autocomplete: {source: "{{ autocomplete_url|addslashes }}"} }); function detectErrors() { var errorSections = {}; // First count up all the errors $('form.address-create .error-message').each(function(){ var parentSection = $(this).closest('section'); if(!errorSections[parentSection.attr('id')]){ errorSections[parentSection.attr('id')] = 0; } errorSections[parentSection.attr('id')] = errorSections[parentSection.attr('id')]+1; }); // Now identify them on each tab for(var index in errorSections) { $('.tab-nav a[href=#'+ index +']').addClass('errors').attr('data-count', errorSections[index]); } } detectErrors(); }
Java
require 'spec_helper' describe Hbc::CLI do it "lists the taps for Casks that show up in two taps" do listing = Hbc::CLI.nice_listing(%w[ caskroom/cask/adium caskroom/cask/google-chrome passcod/homebrew-cask/adium ]) expect(listing).to eq(%w[ caskroom/cask/adium google-chrome passcod/cask/adium ]) end describe ".process" do let(:noop_command) { double('CLI::Noop') } before { allow(Hbc::CLI).to receive(:lookup_command) { noop_command } allow(noop_command).to receive(:run) } it "respects the env variable when choosing what appdir to create" do EnvHelper.with_env_var('HOMEBREW_CASK_OPTS', "--appdir=/custom/appdir") do allow(Hbc).to receive(:init) { expect(Hbc.appdir.to_s).to eq('/custom/appdir') } Hbc::CLI.process('noop') end end # todo: merely invoking init causes an attempt to create the caskroom directory # # it "respects the ENV variable when choosing a non-default Caskroom location" do # EnvHelper.with_env_var 'HOMEBREW_CASK_OPTS', "--caskroom=/custom/caskdir" do # allow(Hbc).to receive(:init) { # expect(Hbc.caskroom.to_s).to eq('/custom/caskdir') # } # Hbc::CLI.process('noop') # end # end it "exits with a status of 1 when something goes wrong" do Hbc::CLI.expects(:exit).with(1) Hbc::CLI.expects(:lookup_command).raises(Hbc::CaskError) allow(Hbc).to receive(:init) { shutup { Hbc::CLI.process('noop') } } end it "passes `--version` along to the subcommand" do expect(Hbc::CLI).to receive(:run_command).with(noop_command, '--version') shutup { Hbc::CLI.process(['noop', '--version']) } end end end
Java
# $FreeBSD: soc2013/dpl/head/lib/libiconv_modules/UTF1632/Makefile 219062 2011-02-25 00:04:39Z gabor $ SHLIB= UTF1632 SRCS+= citrus_utf1632.c CFLAGS+= --param max-inline-insns-single=32 .include <bsd.lib.mk>
Java
class Fio < Formula desc "I/O benchmark and stress test" homepage "https://github.com/axboe/fio" url "https://github.com/axboe/fio/archive/fio-3.19.tar.gz" sha256 "809963b1d023dbc9ac7065557af8129aee17b6895e0e8c5ca671b0b14285f404" license "GPL-2.0" bottle do cellar :any_skip_relocation sha256 "252dd7cba1c767568b9ecb13fbbd891e1ffe47f590ed126cfea8214ff20333f5" => :catalina sha256 "2b4b3372f9ad040eb974ba38ecdde11c08b0328fae71d785e5d0b88c77ecffc3" => :mojave sha256 "89e47c70a1cca2e1acf29b97720da6b968348ea93a5e417fdca7ad86d670114d" => :high_sierra sha256 "36e4581c322b86af955360a9986647ed433cff09029e47e67450d65dc9a95766" => :x86_64_linux end uses_from_macos "zlib" def install system "./configure" # fio's CFLAGS passes vital stuff around, and crushing it will break the build system "make", "prefix=#{prefix}", "mandir=#{man}", "sharedir=#{share}", "CC=#{ENV.cc}", "V=true", # get normal verbose output from fio's makefile "install" end test do system "#{bin}/fio", "--parse-only" end end
Java
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.13"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>SFMT: Globals</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">SFMT &#160;<span id="projectnumber">1.4</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.13 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',false,false,'search.php','Search'); }); </script> <div id="main-nav"></div> </div><!-- top --> <div class="contents"> &#160;<ul> <li>sfmt_t : <a class="el" href="_s_f_m_t_8h.html#a786e4a6ba82d3cb2f62241d6351d973f">SFMT.h</a> </li> <li>w128_t : <a class="el" href="_s_f_m_t_8h.html#ab1ee414cba9ca0f33a3716e7a92c2b79">SFMT.h</a> </li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Tue Feb 7 2017 13:45:36 for SFMT by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.13 </small></address> </body> </html>
Java
/**************************************************************************** * arch/arm/src/nuc1xx/nuc_lowputc.c * * Copyright (C) 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <[email protected]> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ /**************************************************************************** * Included Files ****************************************************************************/ #include <nuttx/config.h> #include <stdint.h> #include <assert.h> #include <debug.h> #include <arch/board/board.h> #include "up_arch.h" #include "chip.h" #include "nuc_config.h" #include "chip/chip/nuc_clk.h" #include "chip/chip/nuc_uart.h" #include "chip/nuc_gcr.h" #include "nuc_lowputc.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ /* Get the serial console UART configuration */ #ifdef HAVE_SERIAL_CONSOLE # if defined(CONFIG_UART0_SERIAL_CONSOLE) # define NUC_CONSOLE_BASE NUC_UART0_BASE # define NUC_CONSOLE_DEPTH UART0_FIFO_DEPTH # define NUC_CONSOLE_BAUD CONFIG_UART0_BAUD # define NUC_CONSOLE_BITS CONFIG_UART0_BITS # define NUC_CONSOLE_PARITY CONFIG_UART0_PARITY # define NUC_CONSOLE_2STOP CONFIG_UART0_2STOP # elif defined(CONFIG_UART1_SERIAL_CONSOLE) # define NUC_CONSOLE_BASE NUC_UART1_BASE # define NUC_CONSOLE_DEPTH UART1_FIFO_DEPTH # define NUC_CONSOLE_BAUD CONFIG_UART1_BAUD # define NUC_CONSOLE_BITS CONFIG_UART1_BITS # define NUC_CONSOLE_PARITY CONFIG_UART1_PARITY # define NUC_CONSOLE_2STOP CONFIG_UART1_2STOP # elif defined(CONFIG_UART2_SERIAL_CONSOLE) # define NUC_CONSOLE_BASE NUC_UART2_BASE # define NUC_CONSOLE_DEPTH UART2_FIFO_DEPTH # define NUC_CONSOLE_BAUD CONFIG_UART2_BAUD # define NUC_CONSOLE_BITS CONFIG_UART2_BITS # define NUC_CONSOLE_PARITY CONFIG_UART2_PARITY # define NUC_CONSOLE_2STOP CONFIG_UART2_2STOP # endif #endif /* Select either the external high speed crystal, the PLL output, or * the internal high speed clock as the UART clock source. */ #if defined(CONFIG_NUC_UARTCLK_XTALHI) # define NUC_UART_CLK BOARD_XTALHI_FREQUENCY #elif defined(CONFIG_NUC_UARTCLK_PLL) # define NUC_UART_CLK BOARD_PLL_FOUT #elif defined(CONFIG_NUC_UARTCLK_INTHI) # define NUC_UART_CLK NUC_INTHI_FREQUENCY #endif /**************************************************************************** * Private Functions ****************************************************************************/ /**************************************************************************** * Name: nuc_console_ready * * Description: * Wait until the console is ready to add another character to the TX * FIFO. * *****************************************************************************/ #ifdef HAVE_SERIAL_CONSOLE static inline void nuc_console_ready(void) { #if 1 /* Wait for the TX FIFO to be empty (excessive!) */ while ((getreg32(NUC_CONSOLE_BASE + NUC_UART_FSR_OFFSET) & UART_FSR_TX_EMPTY) == 0); #else uint32_t depth; /* Wait until there is space in the TX FIFO */ do { register uint32_t regval = getreg32(NUC_CONSOLE_BASE + NUC_UART_FSR_OFFSET); depth = (regval & UART_FSR_TX_POINTER_MASK) >> UART_FSR_TX_POINTER_SHIFT; } while (depth >= (NUC_CONSOLE_DEPTH-1)); #endif } #endif /* HAVE_SERIAL_CONSOLE */ /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** * Name: nuc_lowsetup * * Description: * Called at the very beginning of _start. Performs low level initialization. * *****************************************************************************/ void nuc_lowsetup(void) { #ifdef HAVE_UART uint32_t regval; /* Configure UART GPIO pins. * * Basic UART0 TX/RX requires that GPIOB MFP bits 0 and 1 be set. If flow * control is enabled, then GPIOB MFP bits 3 and 4 must also be set and ALT * MFP bits 11, 13, and 14 must be cleared. */ #if defined(CONFIG_NUC_UART0) || defined(CONFIG_NUC_UART1) regval = getreg32(NUC_GCR_GPB_MFP); #ifdef CONFIG_NUC_UART0 #ifdef CONFIG_UART0_FLOW_CONTROL regval |= (GCR_GPB_MFP0 | GCR_GPB_MFP1 | GCR_GPB_MFP2| GCR_GPB_MFP3); #else regval |= (GCR_GPB_MFP0 | GCR_GPB_MFP1); #endif #endif /* CONFIG_NUC_UART0 */ /* Basic UART1 TX/RX requires that GPIOB MFP bits 4 and 5 be set. If flow * control is enabled, then GPIOB MFP bits 6 and 7 must also be set and ALT * MFP bit 11 must be cleared. */ #ifdef CONFIG_NUC_UART1 #ifdef CONFIG_UART1_FLOW_CONTROL regval |= (GCR_GPB_MFP4 | GCR_GPB_MFP5 | GCR_GPB_MFP6| GCR_GPB_MFP7) #else regval |= (GCR_GPB_MFP4 | GCR_GPB_MFP5); #endif #endif /* CONFIG_NUC_UART1 */ putreg32(regval, NUC_GCR_GPB_MFP); #if defined(CONFIG_UART0_FLOW_CONTROL) || defined(CONFIG_UART1_FLOW_CONTROL) regval = getreg32(NUC_GCR_ALT_MFP); regval &= ~GCR_ALT_MFP_EBI_EN; #ifdef CONFIG_UART0_FLOW_CONTROL regval &= ~(GCR_ALT_MFP_EBI_NWRL_EN | GCR_ALT_MFP_EBI_NWRH_WN); #endif putreg32(NUC_GCR_ALT_MFP); #endif /* CONFIG_UART0_FLOW_CONTROL || CONFIG_UART1_FLOW_CONTROL */ #endif /* CONFIG_NUC_UART0 || CONFIG_NUC_UART1 */ /* UART1 TX/RX support requires that GPIOD bits 14 and 15 be set. UART2 * does not support flow control. */ #ifdef CONFIG_NUC_UART2 regval = getreg32(NUC_GCR_GPD_MFP); regval |= (GCR_GPD_MFP14 | GCR_GPD_MFP15); putreg32(regval, NUC_GCR_GPD_MFP); #endif /* CONFIG_NUC_UART2 */ /* Reset the UART peripheral(s) */ regval = getreg32(NUC_GCR_IPRSTC2); #ifdef CONFIG_NUC_UART0 regval |= GCR_IPRSTC2_UART0_RST; putreg32(regval, NUC_GCR_IPRSTC2); regval &= ~GCR_IPRSTC2_UART0_RST; putreg32(regval, NUC_GCR_IPRSTC2); #endif #ifdef CONFIG_NUC_UART1 regval |= GCR_IPRSTC2_UART1_RST; putreg32(regval, NUC_GCR_IPRSTC2); regval &= ~GCR_IPRSTC2_UART1_RST; putreg32(regval, NUC_GCR_IPRSTC2); #endif #ifdef CONFIG_NUC_UART2 regval |= GCR_IPRSTC2_UART2_RST; putreg32(regval, NUC_GCR_IPRSTC2); regval &= ~GCR_IPRSTC2_UART2_RST; putreg32(regval, NUC_GCR_IPRSTC2); #endif /* Configure the UART clock source. Set the UART clock source to either * the external high speed crystal (CLKSEL1 reset value), the PLL output, * or the internal high speed clock. */ regval = getreg32(NUC_CLK_CLKSEL1); regval &= ~CLK_CLKSEL1_UART_S_MASK; #if defined(CONFIG_NUC_UARTCLK_XTALHI) regval |= CLK_CLKSEL1_UART_S_XTALHI; #elif defined(CONFIG_NUC_UARTCLK_PLL) regval |= CLK_CLKSEL1_UART_S_PLL; #elif defined(CONFIG_NUC_UARTCLK_INTHI) regval |= CLK_CLKSEL1_UART_S_INTHI; #endif putreg32(regval, NUC_CLK_CLKSEL1); /* Enable UART clocking for the selected UARTs */ regval = getreg32(NUC_CLK_APBCLK); regval &= ~(CLK_APBCLK_UART0_EN | CLK_APBCLK_UART1_EN | CLK_APBCLK_UART2_EN); #ifdef CONFIG_NUC_UART0 regval |= CLK_APBCLK_UART0_EN; #endif #ifdef CONFIG_NUC_UART1 regval |= CLK_APBCLK_UART1_EN; #endif #ifdef CONFIG_NUC_UART2 regval |= CLK_APBCLK_UART2_EN; #endif putreg32(regval, NUC_CLK_APBCLK); /* Configure the console UART */ #ifdef HAVE_SERIAL_CONSOLE /* Reset the TX FIFO */ regval = getreg32(NUC_CONSOLE_BASE + NUC_UART_FCR_OFFSET); regval &= ~(UART_FCR_TFR | UART_FCR_RFR); putreg32(regval | UART_FCR_TFR, NUC_CONSOLE_BASE + NUC_UART_FCR_OFFSET); /* Reset the RX FIFO */ putreg32(regval | UART_FCR_RFR, NUC_CONSOLE_BASE + NUC_UART_FCR_OFFSET); /* Set Rx Trigger Level */ regval &= ~UART_FCR_RFITL_MASK; regval |= UART_FCR_RFITL_4; putreg32(regval, NUC_CONSOLE_BASE + NUC_UART_FCR_OFFSET); /* Set Parity & Data bits and Stop bits */ regval = 0; #if NUC_CONSOLE_BITS == 5 regval |= UART_LCR_WLS_5; #elif NUC_CONSOLE_BITS == 6 regval |= UART_LCR_WLS_6; #elif NUC_CONSOLE_BITS == 7 regval |= UART_LCR_WLS_7; #elif NUC_CONSOLE_BITS == 8 regval |= UART_LCR_WLS_8; #else error "Unknown console UART data width" #endif #if NUC_CONSOLE_PARITY == 1 regval |= UART_LCR_PBE; #elif NUC_CONSOLE_PARITY == 2 regval |= (UART_LCR_PBE | UART_LCR_EPE); #endif #if NUC_CONSOLE_2STOP != 0 regval |= UART_LCR_NSB; #endif putreg32(regval, NUC_CONSOLE_BASE + NUC_UART_LCR_OFFSET); /* Set Time-Out values */ regval = UART_TOR_TOIC(40) | UART_TOR_DLY(0); putreg32(regval, NUC_CONSOLE_BASE + NUC_UART_TOR_OFFSET); /* Set the baud */ nuc_setbaud(NUC_CONSOLE_BASE, NUC_CONSOLE_BAUD); #endif /* HAVE_SERIAL_CONSOLE */ #endif /* HAVE_UART */ } /**************************************************************************** * Name: nuc_lowputc * * Description: * Output one character to the UART using a simple polling method. * *****************************************************************************/ void nuc_lowputc(uint32_t ch) { #ifdef HAVE_SERIAL_CONSOLE /* Wait for the TX FIFO to become available */ nuc_console_ready(); /* Then write the character to to the TX FIFO */ putreg32(ch, NUC_CONSOLE_BASE + NUC_UART_THR_OFFSET); #endif /* HAVE_SERIAL_CONSOLE */ } /**************************************************************************** * Name: nuc_setbaud * * Description: * Set the BAUD divxisor for the selected UART * * Mode DIV_X_EN DIV_X_ONE Divider X BRD (Baud rate equation) * ------------------------------------------------------------- * 0 0 0 B A UART_CLK / [16 * (A+2)] * 1 1 0 B A UART_CLK / [(B+1) * (A+2)] , B must >= 8 * 2 1 1 Don't care A UART_CLK / (A+2), A must >=3 * * Here we assume that the default clock source for the UART modules is * the external high speed crystal. * *****************************************************************************/ #ifdef HAVE_UART void nuc_setbaud(uintptr_t base, uint32_t baud) { uint32_t regval; uint32_t clksperbit; uint32_t brd; uint32_t divx; regval = getreg32(base + NUC_UART_BAUD_OFFSET); /* Mode 0: Source Clock mod 16 < 3 => Using Divider X = 16 */ clksperbit = (NUC_UART_CLK + (baud >> 1)) / baud; if ((clksperbit & 15) < 3) { regval &= ~(UART_BAUD_DIV_X_ONE | UART_BAUD_DIV_X_EN); brd = (clksperbit >> 4) - 2; } /* Source Clock mod 16 >3 => Up 5% Error BaudRate */ else { /* Mode 2: Try to Set Divider X = 1 */ regval |= (UART_BAUD_DIV_X_ONE | UART_BAUD_DIV_X_EN); brd = clksperbit - 2; /* Check if the divxider exceeds the range */ if (brd > 0xffff) { /* Mode 1: Try to Set Divider X up 10 */ regval &= ~UART_BAUD_DIV_X_ONE; for (divx = 8; divx < 16; divx++) { brd = clksperbit % (divx + 1); if (brd < 3) { regval &= ~UART_BAUD_DIVIDER_X_MASK; regval |= UART_BAUD_DIVIDER_X(divx); brd -= 2; break; } } } } regval &= ~UART_BAUD_BRD_MASK; regval |= UART_BAUD_BRD(brd); putreg32(regval, base + NUC_UART_BAUD_OFFSET); } #endif /* HAVE_UART */
Java
require "language/haskell" class Purescript < Formula include Language::Haskell::Cabal desc "Strongly typed programming language that compiles to JavaScript" homepage "http://www.purescript.org" url "https://github.com/purescript/purescript/archive/v0.11.7.tar.gz" sha256 "56b715acc4b92a5e389f7ec5244c9306769a515e1da2696d9c2c89e318adc9f9" head "https://github.com/purescript/purescript.git" bottle do cellar :any_skip_relocation sha256 "b1e281b76d895e1791902765491a35ed2524cff90ecb99a72a190b1e0f387b77" => :high_sierra sha256 "01c8ec5708e23689a7e47a2cea0a3130cdcc4cce3b621c3b4c6b3653a1481617" => :sierra sha256 "ee0a11eb6bfd302a27653c074a0d237b5bdf570579394b94fe21ee0638a8e0ef" => :el_capitan end depends_on "cabal-install" => :build depends_on "ghc" => :build def install inreplace (buildpath/"scripts").children, /^purs /, "#{bin}/purs " bin.install (buildpath/"scripts").children cabal_sandbox do if build.head? cabal_install "hpack" system "./.cabal-sandbox/bin/hpack" else system "cabal", "get", "purescript-#{version}" mv "purescript-#{version}/purescript.cabal", "." end install_cabal_package "-f release", :using => ["alex", "happy"] end end test do test_module_path = testpath/"Test.purs" test_target_path = testpath/"test-module.js" test_module_path.write <<~EOS module Test where main :: Int main = 1 EOS system bin/"psc", test_module_path, "-o", test_target_path assert_predicate test_target_path, :exist? end end
Java
# Keywords This listing explains the usage of every Pony keyword. |Keyword | Usage| | --- | --- | | actor | defines an actor | as | conversion of a value to another Type (can raise an error) | be | behavior, executed asynchronously | box | default reference capability – object is readable, but not writable | break | to step out of a loop statement | class | defines a class | compile_error | will provoke a compile error | continue | continues a loop with the next iteration | consume | move a value to a new variable, leaving the original variable empty | do | loop statement, or after a with statement | else | conditional statement in if, for, while, repeat, try (as a catch block), match | elseif | conditional statement, also used with ifdef | embed | embed a class as a field of another class | end | ending of: if then, ifdef, while do, for in, repeat until, try, object, lambda, recover, match | error | raises an error | for | loop statement | fun | define a function, executed synchronously | if | (1) conditional statement | | (2) to define a guard in a pattern match | ifdef | when defining a build flag at compile time: ponyc –D "foo" | in | used in a for in - loop statement | interface | used in structural subtyping | is | (1) used in nominal subtyping | | (2) in type aliasing | iso | reference capability – read and write uniqueness | lambda | to make a closure | let | declaration of immutable variable: you can't rebind this name to a new value | match | pattern matching | new | constructor | object | to make an object literal | primitive | declares a primitive type | recover | removes the reference capability of a variable | ref | reference capability – object (on which function is called) is mutable | repeat | loop statement | return | to return early from a function | tag | reference capability – neither readable nor writeable, only object identity | then | (1) in if conditional statement | | (2) as a (finally) block in try | this | the current object | trait | used in nominal subtyping: class Foo is TraitName | trn | reference capability – write uniqueness, no other actor can write to the object | try | error handling | type | to declare a type alias | until | loop statement | use | (1) using a package | | (2) using an external library foo: use "lib:foo" | | (3) declaration of an FFI signature | | (4) add a search path for external libraries: use "path:/usr/local/lib" | var | declaration of mutable variable: you can rebind this name to a new value | val | reference capability – globally immutable object | where | when specifying named arguments | while | loop statement | with | ensure disposal of an object
Java
/* * Copyright (C) 1999 Lars Knoll ([email protected]) * (C) 1999 Antti Koivisto ([email protected]) * (C) 2000 Dirk Mueller ([email protected]) * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #ifndef HTMLButtonElement_h #define HTMLButtonElement_h #include "HTMLFormControlElement.h" namespace WebCore { class HTMLButtonElement : public HTMLFormControlElement { public: static PassRefPtr<HTMLButtonElement> create(const QualifiedName&, Document*, HTMLFormElement*); void setType(const AtomicString&); String value() const; virtual bool willRespondToMouseClickEvents() OVERRIDE; private: HTMLButtonElement(const QualifiedName& tagName, Document*, HTMLFormElement*); enum Type { SUBMIT, RESET, BUTTON }; virtual const AtomicString& formControlType() const; virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); virtual void willAddAuthorShadowRoot() OVERRIDE; virtual void parseAttribute(const Attribute&) OVERRIDE; virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; virtual void defaultEventHandler(Event*); virtual bool appendFormData(FormDataList&, bool); virtual bool isEnumeratable() const { return true; } virtual bool supportLabels() const OVERRIDE { return true; } virtual bool isSuccessfulSubmitButton() const; virtual bool isActivatedSubmit() const; virtual void setActivatedSubmit(bool flag); virtual void accessKeyAction(bool sendMouseEvents); virtual bool isURLAttribute(const Attribute&) const OVERRIDE; virtual bool canStartSelection() const { return false; } virtual bool isOptionalFormControl() const { return true; } virtual bool recalcWillValidate() const; Type m_type; bool m_isActivatedSubmit; }; } // namespace #endif
Java
/* * Copyright (c) 2008-2011, Matthias Mann * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Matthias Mann nor the names of its contributors may * be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package de.matthiasmann.twl; import de.matthiasmann.twl.model.IntegerModel; import de.matthiasmann.twl.model.ListModel; import de.matthiasmann.twl.renderer.Image; import de.matthiasmann.twl.utils.TypeMapping; /** * A wheel widget. * * @param <T> The data type for the wheel items * * @author Matthias Mann */ public class WheelWidget<T> extends Widget { public interface ItemRenderer { public Widget getRenderWidget(Object data); } private final TypeMapping<ItemRenderer> itemRenderer; private final L listener; private final R renderer; private final Runnable timerCB; protected int itemHeight; protected int numVisibleItems; protected Image selectedOverlay; private static final int TIMER_INTERVAL = 30; private static final int MIN_SPEED = 3; private static final int MAX_SPEED = 100; protected Timer timer; protected int dragStartY; protected long lastDragTime; protected long lastDragDelta; protected int lastDragDist; protected boolean hasDragStart; protected boolean dragActive; protected int scrollOffset; protected int scrollAmount; protected ListModel<T> model; protected IntegerModel selectedModel; protected int selected; protected boolean cyclic; public WheelWidget() { this.itemRenderer = new TypeMapping<ItemRenderer>(); this.listener = new L(); this.renderer = new R(); this.timerCB = new Runnable() { public void run() { onTimer(); } }; itemRenderer.put(String.class, new StringItemRenderer()); super.insertChild(renderer, 0); setCanAcceptKeyboardFocus(true); } public WheelWidget(ListModel<T> model) { this(); this.model = model; } public ListModel<T> getModel() { return model; } public void setModel(ListModel<T> model) { removeListener(); this.model = model; addListener(); invalidateLayout(); } public IntegerModel getSelectedModel() { return selectedModel; } public void setSelectedModel(IntegerModel selectedModel) { removeSelectedListener(); this.selectedModel = selectedModel; addSelectedListener(); } public int getSelected() { return selected; } public void setSelected(int selected) { int oldSelected = this.selected; if(oldSelected != selected) { this.selected = selected; if(selectedModel != null) { selectedModel.setValue(selected); } firePropertyChange("selected", oldSelected, selected); } } public boolean isCyclic() { return cyclic; } public void setCyclic(boolean cyclic) { this.cyclic = cyclic; } public int getItemHeight() { return itemHeight; } public int getNumVisibleItems() { return numVisibleItems; } public boolean removeItemRenderer(Class<? extends T> clazz) { if(itemRenderer.remove(clazz)) { super.removeAllChildren(); invalidateLayout(); return true; } return false; } public void registerItemRenderer(Class<? extends T> clazz, ItemRenderer value) { itemRenderer.put(clazz, value); invalidateLayout(); } public void scroll(int amount) { scrollInt(amount); scrollAmount = 0; } protected void scrollInt(int amount) { int pos = selected; int half = itemHeight / 2; scrollOffset += amount; while(scrollOffset >= half) { scrollOffset -= itemHeight; pos++; } while(scrollOffset <= -half) { scrollOffset += itemHeight; pos--; } if(!cyclic) { int n = getNumEntries(); if(n > 0) { while(pos >= n) { pos--; scrollOffset += itemHeight; } } while(pos < 0) { pos++; scrollOffset -= itemHeight; } scrollOffset = Math.max(-itemHeight, Math.min(itemHeight, scrollOffset)); } setSelected(pos); if(scrollOffset == 0 && scrollAmount == 0) { stopTimer(); } else { startTimer(); } } public void autoScroll(int dir) { if(dir != 0) { if(scrollAmount != 0 && Integer.signum(scrollAmount) != Integer.signum(dir)) { scrollAmount = dir; } else { scrollAmount += dir; } startTimer(); } } @Override public int getPreferredInnerHeight() { return numVisibleItems * itemHeight; } @Override public int getPreferredInnerWidth() { int width = 0; for(int i=0,n=getNumEntries() ; i<n ; i++) { Widget w = getItemRenderer(i); if(w != null) { width = Math.max(width, w.getPreferredWidth()); } } return width; } @Override protected void paintOverlay(GUI gui) { super.paintOverlay(gui); if(selectedOverlay != null) { int y = getInnerY() + itemHeight * (numVisibleItems/2); if((numVisibleItems & 1) == 0) { y -= itemHeight/2; } selectedOverlay.draw(getAnimationState(), getX(), y, getWidth(), itemHeight); } } @Override protected boolean handleEvent(Event evt) { if(evt.isMouseDragEnd() && dragActive) { int absDist = Math.abs(lastDragDist); if(absDist > 3 && lastDragDelta > 0) { int amount = (int)Math.min(1000, absDist * 100 / lastDragDelta); autoScroll(amount * Integer.signum(lastDragDist)); } hasDragStart = false; dragActive = false; return true; } if(evt.isMouseDragEvent()) { if(hasDragStart) { long time = getTime(); dragActive = true; lastDragDist = dragStartY - evt.getMouseY(); lastDragDelta = Math.max(1, time - lastDragTime); scroll(lastDragDist); dragStartY = evt.getMouseY(); lastDragTime = time; } return true; } if(super.handleEvent(evt)) { return true; } switch(evt.getType()) { case MOUSE_WHEEL: autoScroll(itemHeight * evt.getMouseWheelDelta()); return true; case MOUSE_BTNDOWN: if(evt.getMouseButton() == Event.MOUSE_LBUTTON) { dragStartY = evt.getMouseY(); lastDragTime = getTime(); hasDragStart = true; } return true; case KEY_PRESSED: switch(evt.getKeyCode()) { case Event.KEY_UP: autoScroll(-itemHeight); return true; case Event.KEY_DOWN: autoScroll(+itemHeight); return true; } return false; } return evt.isMouseEvent(); } protected long getTime() { GUI gui = getGUI(); return (gui != null) ? gui.getCurrentTime() : 0; } protected int getNumEntries() { return (model == null) ? 0 : model.getNumEntries(); } protected Widget getItemRenderer(int i) { T item = model.getEntry(i); if(item != null) { ItemRenderer ir = itemRenderer.get(item.getClass()); if(ir != null) { Widget w = ir.getRenderWidget(item); if(w != null) { if(w.getParent() != renderer) { w.setVisible(false); renderer.add(w); } return w; } } } return null; } protected void startTimer() { if(timer != null && !timer.isRunning()) { timer.start(); } } protected void stopTimer() { if(timer != null) { timer.stop(); } } protected void onTimer() { int amount = scrollAmount; int newAmount = amount; if(amount == 0 && !dragActive) { amount = -scrollOffset; } if(amount != 0) { int absAmount = Math.abs(amount); int speed = absAmount * TIMER_INTERVAL / 200; int dir = Integer.signum(amount) * Math.min(absAmount, Math.max(MIN_SPEED, Math.min(MAX_SPEED, speed))); if(newAmount != 0) { newAmount -= dir; } scrollAmount = newAmount; scrollInt(dir); } } @Override protected void layout() { layoutChildFullInnerArea(renderer); } @Override protected void applyTheme(ThemeInfo themeInfo) { super.applyTheme(themeInfo); applyThemeWheel(themeInfo); } protected void applyThemeWheel(ThemeInfo themeInfo) { itemHeight = themeInfo.getParameter("itemHeight", 10); numVisibleItems = themeInfo.getParameter("visibleItems", 5); selectedOverlay = themeInfo.getImage("selectedOverlay"); invalidateLayout(); } @Override protected void afterAddToGUI(GUI gui) { super.afterAddToGUI(gui); addListener(); addSelectedListener(); timer = gui.createTimer(); timer.setCallback(timerCB); timer.setDelay(TIMER_INTERVAL); timer.setContinuous(true); } @Override protected void beforeRemoveFromGUI(GUI gui) { timer.stop(); timer = null; removeListener(); removeSelectedListener(); super.beforeRemoveFromGUI(gui); } @Override public void insertChild(Widget child, int index) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } @Override public void removeAllChildren() throws UnsupportedOperationException { throw new UnsupportedOperationException(); } @Override public Widget removeChild(int index) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } private void addListener() { if(model != null) { model.addChangeListener(listener); } } private void removeListener() { if(model != null) { model.removeChangeListener(listener); } } private void addSelectedListener() { if(selectedModel != null) { selectedModel.addCallback(listener); syncSelected(); } } private void removeSelectedListener() { if(selectedModel != null) { selectedModel.removeCallback(listener); } } void syncSelected() { setSelected(selectedModel.getValue()); } void entriesDeleted(int first, int last) { if(selected > first) { if(selected > last) { setSelected(selected - (last-first+1)); } else { setSelected(first); } } invalidateLayout(); } void entriesInserted(int first, int last) { if(selected >= first) { setSelected(selected + (last-first+1)); } invalidateLayout(); } class L implements ListModel.ChangeListener, Runnable { public void allChanged() { invalidateLayout(); } public void entriesChanged(int first, int last) { invalidateLayout(); } public void entriesDeleted(int first, int last) { WheelWidget.this.entriesDeleted(first, last); } public void entriesInserted(int first, int last) { WheelWidget.this.entriesInserted(first, last); } public void run() { syncSelected(); } } class R extends Widget { public R() { setTheme(""); setClip(true); } @Override protected void paintWidget(GUI gui) { if(model == null) { return; } int width = getInnerWidth(); int x = getInnerX(); int y = getInnerY(); int numItems = model.getNumEntries(); int numDraw = numVisibleItems; int startIdx = selected - numVisibleItems/2; if((numDraw & 1) == 0) { y -= itemHeight / 2; numDraw++; } if(scrollOffset > 0) { y -= scrollOffset; numDraw++; } if(scrollOffset < 0) { y -= itemHeight + scrollOffset; numDraw++; startIdx--; } main: for(int i=0 ; i<numDraw ; i++) { int idx = startIdx + i; while(idx < 0) { if(!cyclic) { continue main; } idx += numItems; } while(idx >= numItems) { if(!cyclic) { continue main; } idx -= numItems; } Widget w = getItemRenderer(idx); if(w != null) { w.setSize(width, itemHeight); w.setPosition(x, y + i*itemHeight); w.validateLayout(); paintChild(gui, w); } } } @Override public void invalidateLayout() { } @Override protected void sizeChanged() { } } public static class StringItemRenderer extends Label implements WheelWidget.ItemRenderer { public StringItemRenderer() { setCache(false); } public Widget getRenderWidget(Object data) { setText(String.valueOf(data)); return this; } @Override protected void sizeChanged() { } } }
Java
/* * Copyright (c) 2001 Alexander Kabaev * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer * in this position and unchanged. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: soc2013/dpl/head/lib/libkse/thread/thr_rtld.c 174155 2007-11-30 17:20:29Z deischen $ */ #include <sys/cdefs.h> #include <stdlib.h> #include "rtld_lock.h" #include "thr_private.h" static int _thr_rtld_clr_flag(int); static void *_thr_rtld_lock_create(void); static void _thr_rtld_lock_destroy(void *); static void _thr_rtld_lock_release(void *); static void _thr_rtld_rlock_acquire(void *); static int _thr_rtld_set_flag(int); static void _thr_rtld_wlock_acquire(void *); #ifdef NOTYET static void * _thr_rtld_lock_create(void) { pthread_rwlock_t prwlock; if (_pthread_rwlock_init(&prwlock, NULL)) return (NULL); return (prwlock); } static void _thr_rtld_lock_destroy(void *lock) { pthread_rwlock_t prwlock; prwlock = (pthread_rwlock_t)lock; if (prwlock != NULL) _pthread_rwlock_destroy(&prwlock); } static void _thr_rtld_rlock_acquire(void *lock) { pthread_rwlock_t prwlock; prwlock = (pthread_rwlock_t)lock; _thr_rwlock_rdlock(&prwlock); } static void _thr_rtld_wlock_acquire(void *lock) { pthread_rwlock_t prwlock; prwlock = (pthread_rwlock_t)lock; _thr_rwlock_wrlock(&prwlock); } static void _thr_rtld_lock_release(void *lock) { pthread_rwlock_t prwlock; prwlock = (pthread_rwlock_t)lock; _thr_rwlock_unlock(&prwlock); } static int _thr_rtld_set_flag(int mask) { struct pthread *curthread; int bits; curthread = _get_curthread(); if (curthread != NULL) { bits = curthread->rtld_bits; curthread->rtld_bits |= mask; } else { bits = 0; PANIC("No current thread in rtld call"); } return (bits); } static int _thr_rtld_clr_flag(int mask) { struct pthread *curthread; int bits; curthread = _get_curthread(); if (curthread != NULL) { bits = curthread->rtld_bits; curthread->rtld_bits &= ~mask; } else { bits = 0; PANIC("No current thread in rtld call"); } return (bits); } void _thr_rtld_init(void) { struct RtldLockInfo li; li.lock_create = _thr_rtld_lock_create; li.lock_destroy = _thr_rtld_lock_destroy; li.rlock_acquire = _thr_rtld_rlock_acquire; li.wlock_acquire = _thr_rtld_wlock_acquire; li.lock_release = _thr_rtld_lock_release; li.thread_set_flag = _thr_rtld_set_flag; li.thread_clr_flag = _thr_rtld_clr_flag; li.at_fork = NULL; _rtld_thread_init(&li); } void _thr_rtld_fini(void) { _rtld_thread_init(NULL); } #endif struct rtld_kse_lock { struct lock lck; struct kse *owner; kse_critical_t crit; int count; int write; }; static void * _thr_rtld_lock_create(void) { struct rtld_kse_lock *l; if ((l = malloc(sizeof(struct rtld_kse_lock))) != NULL) { _lock_init(&l->lck, LCK_ADAPTIVE, _kse_lock_wait, _kse_lock_wakeup, calloc); l->owner = NULL; l->count = 0; l->write = 0; } return (l); } static void _thr_rtld_lock_destroy(void *lock __unused) { /* XXX We really can not free memory after a fork() */ #if 0 struct rtld_kse_lock *l; l = (struct rtld_kse_lock *)lock; _lock_destroy(&l->lck); free(l); #endif return; } static void _thr_rtld_rlock_acquire(void *lock) { struct rtld_kse_lock *l; kse_critical_t crit; struct kse *curkse; l = (struct rtld_kse_lock *)lock; crit = _kse_critical_enter(); curkse = _get_curkse(); if (l->owner == curkse) { l->count++; _kse_critical_leave(crit); /* probably not necessary */ } else { KSE_LOCK_ACQUIRE(curkse, &l->lck); l->crit = crit; l->owner = curkse; l->count = 1; l->write = 0; } } static void _thr_rtld_wlock_acquire(void *lock) { struct rtld_kse_lock *l; kse_critical_t crit; struct kse *curkse; l = (struct rtld_kse_lock *)lock; crit = _kse_critical_enter(); curkse = _get_curkse(); if (l->owner == curkse) { _kse_critical_leave(crit); PANIC("Recursive write lock attempt on rtld lock"); } else { KSE_LOCK_ACQUIRE(curkse, &l->lck); l->crit = crit; l->owner = curkse; l->count = 1; l->write = 1; } } static void _thr_rtld_lock_release(void *lock) { struct rtld_kse_lock *l; kse_critical_t crit; struct kse *curkse; l = (struct rtld_kse_lock *)lock; crit = _kse_critical_enter(); curkse = _get_curkse(); if (l->owner != curkse) { /* * We might want to forcibly unlock the rtld lock * and/or disable threaded mode so there is better * chance that the panic will work. Otherwise, * we could end up trying to take the rtld lock * again. */ _kse_critical_leave(crit); PANIC("Attempt to unlock rtld lock when not owner."); } else { l->count--; if (l->count == 0) { /* * If there ever is a count associated with * _kse_critical_leave(), we'll need to add * another call to it here with the crit * value from above. */ crit = l->crit; l->owner = NULL; l->write = 0; KSE_LOCK_RELEASE(curkse, &l->lck); } _kse_critical_leave(crit); } } static int _thr_rtld_set_flag(int mask __unused) { return (0); } static int _thr_rtld_clr_flag(int mask __unused) { return (0); } void _thr_rtld_init(void) { struct RtldLockInfo li; li.lock_create = _thr_rtld_lock_create; li.lock_destroy = _thr_rtld_lock_destroy; li.rlock_acquire = _thr_rtld_rlock_acquire; li.wlock_acquire = _thr_rtld_wlock_acquire; li.lock_release = _thr_rtld_lock_release; li.thread_set_flag = _thr_rtld_set_flag; li.thread_clr_flag = _thr_rtld_clr_flag; li.at_fork = NULL; _rtld_thread_init(&li); } void _thr_rtld_fini(void) { _rtld_thread_init(NULL); }
Java
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--Rendered using the Haskell Html Library v0.2--> <HTML ><HEAD ><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" ><TITLE >Qtc.Classes.Types</TITLE ><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css" ><SCRIPT SRC="haddock-util.js" TYPE="text/javascript" ></SCRIPT ><SCRIPT TYPE="text/javascript" >window.onload = function () {setSynopsis("mini_Qtc-Classes-Types.html")};</SCRIPT ></HEAD ><BODY ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="topbar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" " ></TD ><TD CLASS="title" ></TD ><TD CLASS="topbut" ><A HREF="index.html" >Contents</A ></TD ><TD CLASS="topbut" ><A HREF="doc-index.html" >Index</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="modulebar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><FONT SIZE="6" >Qtc.Classes.Types</FONT ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Documentation</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:Object" ><A NAME="t%3AObject" ></A ></A ><B >Object</B > a </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="section4" >Constructors</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:Object" ><A NAME="v%3AObject" ></A ></A ><B >Object</B > !(ForeignPtr a)</TD ><TD CLASS="rdoc" ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="section4" ><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Object')" ALT="show/hide" > Instances</TD ></TR ><TR ><TD CLASS="body" ><DIV ID="i:Object" STYLE="display:block;" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="decl" >Eq (<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a)</TD ></TR ><TR ><TD CLASS="decl" >Ord (<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a)</TD ></TR ><TR ><TD CLASS="decl" >Show (<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a)</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="Qtc-Core-Base.html#t%3AQes" >Qes</A > (<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > c)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTimeLine (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimeLine" >QTimeLine</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimeLine" >QTimeLine</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTimer (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimer" >QTimer</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimer" >QTimer</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTranslator (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTranslator" >QTranslator</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTranslator" >QTranslator</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMimeData (<A HREF="Qtc-ClassTypes-Core.html#t%3AQMimeData" >QMimeData</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQMimeData" >QMimeData</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QEventLoop (<A HREF="Qtc-ClassTypes-Core.html#t%3AQEventLoop" >QEventLoop</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQEventLoop" >QEventLoop</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFile (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFile" >QFile</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFile" >QFile</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFileOpenEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFileOpenEvent" >QFileOpenEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFileOpenEvent" >QFileOpenEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QChildEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQChildEvent" >QChildEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQChildEvent" >QChildEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDynamicPropertyChangeEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDynamicPropertyChangeEvent" >QDynamicPropertyChangeEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDynamicPropertyChangeEvent" >QDynamicPropertyChangeEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTimerEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimerEvent" >QTimerEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimerEvent" >QTimerEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractListModel (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractListModel" >QAbstractListModel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractListModel" >QAbstractListModel</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractTableModel (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractTableModel" >QAbstractTableModel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractTableModel" >QAbstractTableModel</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPolygon (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPolygon" >QPolygon</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPolygon" >QPolygon</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLine (<A HREF="Qtc-ClassTypes-Core.html#t%3AQLine" >QLine</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQLine" >QLine</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRegExp (<A HREF="Qtc-ClassTypes-Core.html#t%3AQRegExp" >QRegExp</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQRegExp" >QRegExp</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRect (<A HREF="Qtc-ClassTypes-Core.html#t%3AQRect" >QRect</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQRect" >QRect</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QVariant (<A HREF="Qtc-ClassTypes-Core.html#t%3AQVariant" >QVariant</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQVariant" >QVariant</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPolygonF (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPolygonF" >QPolygonF</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPolygonF" >QPolygonF</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractFileEngine (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractFileEngine" >QAbstractFileEngine</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractFileEngine" >QAbstractFileEngine</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QChar (<A HREF="Qtc-ClassTypes-Core.html#t%3AQChar" >QChar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQChar" >QChar</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDir (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDir" >QDir</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDir" >QDir</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLocale (<A HREF="Qtc-ClassTypes-Core.html#t%3AQLocale" >QLocale</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQLocale" >QLocale</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QUuid (<A HREF="Qtc-ClassTypes-Core.html#t%3AQUuid" >QUuid</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQUuid" >QUuid</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextStream (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTextStream" >QTextStream</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTextStream" >QTextStream</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMatrix (<A HREF="Qtc-ClassTypes-Core.html#t%3AQMatrix" >QMatrix</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQMatrix" >QMatrix</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPoint (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPoint" >QPoint</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPoint" >QPoint</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QModelIndex (<A HREF="Qtc-ClassTypes-Core.html#t%3AQModelIndex" >QModelIndex</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQModelIndex" >QModelIndex</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDataStream (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDataStream" >QDataStream</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDataStream" >QDataStream</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QBasicTimer (<A HREF="Qtc-ClassTypes-Core.html#t%3AQBasicTimer" >QBasicTimer</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQBasicTimer" >QBasicTimer</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSizeF (<A HREF="Qtc-ClassTypes-Core.html#t%3AQSizeF" >QSizeF</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQSizeF" >QSizeF</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QUrl (<A HREF="Qtc-ClassTypes-Core.html#t%3AQUrl" >QUrl</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQUrl" >QUrl</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDateTime (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDateTime" >QDateTime</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDateTime" >QDateTime</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRectF (<A HREF="Qtc-ClassTypes-Core.html#t%3AQRectF" >QRectF</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQRectF" >QRectF</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSize (<A HREF="Qtc-ClassTypes-Core.html#t%3AQSize" >QSize</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQSize" >QSize</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPointF (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPointF" >QPointF</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPointF" >QPointF</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTime (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTime" >QTime</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTime" >QTime</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDate (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDate" >QDate</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDate" >QDate</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFileInfo (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFileInfo" >QFileInfo</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFileInfo" >QFileInfo</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_Qt (<A HREF="Qtc-ClassTypes-Core.html#t%3AQt" >Qt</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQt" >Qt</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLineF (<A HREF="Qtc-ClassTypes-Core.html#t%3AQLineF" >QLineF</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQLineF" >QLineF</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextCodec (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTextCodec" >QTextCodec</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTextCodec" >QTextCodec</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIODevice (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFile" >QFile</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQIODevice" >QIODevice</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIODevice (<A HREF="Qtc-ClassTypes-Core.html#t%3AQIODevice" >QIODevice</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQIODevice" >QIODevice</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemModel (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractListModel" >QAbstractListModel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractItemModel" >QAbstractItemModel</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemModel (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractTableModel" >QAbstractTableModel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractItemModel" >QAbstractItemModel</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemModel (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractItemModel" >QAbstractItemModel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractItemModel" >QAbstractItemModel</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFileOpenEvent" >QFileOpenEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQEvent" >QEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQChildEvent" >QChildEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQEvent" >QEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDynamicPropertyChangeEvent" >QDynamicPropertyChangeEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQEvent" >QEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimerEvent" >QTimerEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQEvent" >QEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQEvent" >QEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQEvent" >QEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimeLine" >QTimeLine</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimer" >QTimer</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQCoreApplication" >QCoreApplication</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTranslator" >QTranslator</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQMimeData" >QMimeData</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQEventLoop" >QEventLoop</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFile" >QFile</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractListModel" >QAbstractListModel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractTableModel" >QAbstractTableModel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQIODevice" >QIODevice</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractItemModel" >QAbstractItemModel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()) ([] (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QToolBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBar" >QToolBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBar" >QToolBar</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGroupBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGroupBox" >QGroupBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGroupBox" >QGroupBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTabBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabBar" >QTabBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabBar" >QTabBar</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStatusBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStatusBar" >QStatusBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStatusBar" >QStatusBar</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSizeGrip (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSizeGrip" >QSizeGrip</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSizeGrip" >QSizeGrip</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDockWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDockWidget" >QDockWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDockWidget" >QDockWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMenuBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMenuBar" >QMenuBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMenuBar" >QMenuBar</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRubberBand (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRubberBand" >QRubberBand</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRubberBand" >QRubberBand</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialogButtonBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialogButtonBox" >QDialogButtonBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialogButtonBox" >QDialogButtonBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QProgressBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQProgressBar" >QProgressBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQProgressBar" >QProgressBar</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTabWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabWidget" >QTabWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabWidget" >QTabWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSplashScreen (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplashScreen" >QSplashScreen</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplashScreen" >QSplashScreen</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFocusFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFocusFrame" >QFocusFrame</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFocusFrame" >QFocusFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMainWindow (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMainWindow" >QMainWindow</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMainWindow" >QMainWindow</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSplitterHandle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplitterHandle" >QSplitterHandle</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplitterHandle" >QSplitterHandle</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDesktopWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDesktopWidget" >QDesktopWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDesktopWidget" >QDesktopWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLineEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLineEdit" >QLineEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLineEdit" >QLineEdit</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCalendarWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCalendarWidget" >QCalendarWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCalendarWidget" >QCalendarWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMenu (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMenu" >QMenu</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMenu" >QMenu</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDoubleValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDoubleValidator" >QDoubleValidator</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDoubleValidator" >QDoubleValidator</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIntValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIntValidator" >QIntValidator</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIntValidator" >QIntValidator</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRegExpValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRegExpValidator" >QRegExpValidator</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRegExpValidator" >QRegExpValidator</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTreeWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextTableFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTableFormat" >QTextTableFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTableFormat" >QTextTableFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextTable (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTable" >QTextTable</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTable" >QTextTable</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextListFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextListFormat" >QTextListFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextListFormat" >QTextListFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextBlockFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockFormat" >QTextBlockFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockFormat" >QTextBlockFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextBrowser (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBrowser" >QTextBrowser</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBrowser" >QTextBrowser</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextImageFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextImageFormat" >QTextImageFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextImageFormat" >QTextImageFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextList (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextList" >QTextList</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextList" >QTextList</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTableWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionViewItemV3 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV3" >QStyleOptionViewItemV3</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV3" >QStyleOptionViewItemV3</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionToolBoxV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBoxV2" >QStyleOptionToolBoxV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBoxV2" >QStyleOptionToolBoxV2</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionTabV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabV2" >QStyleOptionTabV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabV2" >QStyleOptionTabV2</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionProgressBarV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBarV2" >QStyleOptionProgressBarV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBarV2" >QStyleOptionProgressBarV2</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionFrameV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrameV2" >QStyleOptionFrameV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrameV2" >QStyleOptionFrameV2</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionDockWidgetV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidgetV2" >QStyleOptionDockWidgetV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidgetV2" >QStyleOptionDockWidgetV2</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionSizeGrip (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSizeGrip" >QStyleOptionSizeGrip</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSizeGrip" >QStyleOptionSizeGrip</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComboBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComboBox" >QStyleOptionComboBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComboBox" >QStyleOptionComboBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSpinBox" >QStyleOptionSpinBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSpinBox" >QStyleOptionSpinBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionGroupBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionGroupBox" >QStyleOptionGroupBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionGroupBox" >QStyleOptionGroupBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionTitleBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTitleBar" >QStyleOptionTitleBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTitleBar" >QStyleOptionTitleBar</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionSlider (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSlider" >QStyleOptionSlider</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSlider" >QStyleOptionSlider</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionToolButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolButton" >QStyleOptionToolButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolButton" >QStyleOptionToolButton</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionButton" >QStyleOptionButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionButton" >QStyleOptionButton</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionMenuItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionMenuItem" >QStyleOptionMenuItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionMenuItem" >QStyleOptionMenuItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionTabWidgetFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabWidgetFrame" >QStyleOptionTabWidgetFrame</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabWidgetFrame" >QStyleOptionTabWidgetFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionFocusRect (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFocusRect" >QStyleOptionFocusRect</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFocusRect" >QStyleOptionFocusRect</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionTabBarBase (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabBarBase" >QStyleOptionTabBarBase</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabBarBase" >QStyleOptionTabBarBase</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionHeader (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionHeader" >QStyleOptionHeader</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionHeader" >QStyleOptionHeader</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionToolBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBar" >QStyleOptionToolBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBar" >QStyleOptionToolBar</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionGraphicsItem" >QStyleOptionGraphicsItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionGraphicsItem" >QStyleOptionGraphicsItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionRubberBand (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionRubberBand" >QStyleOptionRubberBand</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionRubberBand" >QStyleOptionRubberBand</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QBitmap (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBitmap" >QBitmap</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBitmap" >QBitmap</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QImage (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQImage" >QImage</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQImage" >QImage</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPrinter (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrinter" >QPrinter</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrinter" >QPrinter</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPicture (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPicture" >QPicture</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPicture" >QPicture</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QItemSelectionModel (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQItemSelectionModel" >QItemSelectionModel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQItemSelectionModel" >QItemSelectionModel</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QActionGroup (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQActionGroup" >QActionGroup</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQActionGroup" >QActionGroup</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsTextItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsTextItem" >QGraphicsTextItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsTextItem" >QGraphicsTextItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QUndoGroup (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoGroup" >QUndoGroup</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoGroup" >QUndoGroup</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsScene (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsScene" >QGraphicsScene</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsScene" >QGraphicsScene</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QClipboard (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQClipboard" >QClipboard</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQClipboard" >QClipboard</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSystemTrayIcon (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSystemTrayIcon" >QSystemTrayIcon</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSystemTrayIcon" >QSystemTrayIcon</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDataWidgetMapper (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDataWidgetMapper" >QDataWidgetMapper</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDataWidgetMapper" >QDataWidgetMapper</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractTextDocumentLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractTextDocumentLayout" >QAbstractTextDocumentLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractTextDocumentLayout" >QAbstractTextDocumentLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputContext (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputContext" >QInputContext</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputContext" >QInputContext</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QUndoStack (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoStack" >QUndoStack</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoStack" >QUndoStack</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCompleter (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCompleter" >QCompleter</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCompleter" >QCompleter</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSyntaxHighlighter (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSyntaxHighlighter" >QSyntaxHighlighter</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSyntaxHighlighter" >QSyntaxHighlighter</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemDelegate (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemDelegate" >QAbstractItemDelegate</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemDelegate" >QAbstractItemDelegate</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSound (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSound" >QSound</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSound" >QSound</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QShortcut (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQShortcut" >QShortcut</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQShortcut" >QShortcut</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDrag (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDrag" >QDrag</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDrag" >QDrag</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QButtonGroup (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQButtonGroup" >QButtonGroup</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQButtonGroup" >QButtonGroup</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAction (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAction" >QAction</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAction" >QAction</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMovie (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMovie" >QMovie</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMovie" >QMovie</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextDocument (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextDocument" >QTextDocument</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextDocument" >QTextDocument</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItemAnimation (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItemAnimation" >QGraphicsItemAnimation</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItemAnimation" >QGraphicsItemAnimation</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QUndoView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QListWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSpacerItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSpacerItem" >QSpacerItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSpacerItem" >QSpacerItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStackedLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStackedLayout" >QStackedLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStackedLayout" >QStackedLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGridLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGridLayout" >QGridLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGridLayout" >QGridLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QContextMenuEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQContextMenuEvent" >QContextMenuEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQContextMenuEvent" >QContextMenuEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTabletEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabletEvent" >QTabletEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabletEvent" >QTabletEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWheelEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWheelEvent" >QWheelEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWheelEvent" >QWheelEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QKeyEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQKeyEvent" >QKeyEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQKeyEvent" >QKeyEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMouseEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMouseEvent" >QMouseEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMouseEvent" >QMouseEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIconEngineV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIconEngineV2" >QIconEngineV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIconEngineV2" >QIconEngineV2</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneWheelEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneWheelEvent" >QGraphicsSceneWheelEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneWheelEvent" >QGraphicsSceneWheelEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneDragDropEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneDragDropEvent" >QGraphicsSceneDragDropEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneDragDropEvent" >QGraphicsSceneDragDropEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneMouseEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneMouseEvent" >QGraphicsSceneMouseEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneMouseEvent" >QGraphicsSceneMouseEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneContextMenuEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneContextMenuEvent" >QGraphicsSceneContextMenuEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneContextMenuEvent" >QGraphicsSceneContextMenuEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneHoverEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneHoverEvent" >QGraphicsSceneHoverEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneHoverEvent" >QGraphicsSceneHoverEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneHelpEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneHelpEvent" >QGraphicsSceneHelpEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneHelpEvent" >QGraphicsSceneHelpEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItemGroup (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItemGroup" >QGraphicsItemGroup</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItemGroup" >QGraphicsItemGroup</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsPixmapItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPixmapItem" >QGraphicsPixmapItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPixmapItem" >QGraphicsPixmapItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsLineItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsLineItem" >QGraphicsLineItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsLineItem" >QGraphicsLineItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRadialGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRadialGradient" >QRadialGradient</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRadialGradient" >QRadialGradient</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QConicalGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQConicalGradient" >QConicalGradient</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQConicalGradient" >QConicalGradient</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLinearGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLinearGradient" >QLinearGradient</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLinearGradient" >QLinearGradient</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSplitter (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplitter" >QSplitter</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplitter" >QSplitter</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStackedWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStackedWidget" >QStackedWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStackedWidget" >QStackedWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLCDNumber (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLCDNumber" >QLCDNumber</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLCDNumber" >QLCDNumber</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QToolBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBox" >QToolBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBox" >QToolBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLabel (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLabel" >QLabel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLabel" >QLabel</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMoveEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMoveEvent" >QMoveEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMoveEvent" >QMoveEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCloseEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCloseEvent" >QCloseEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCloseEvent" >QCloseEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QShortcutEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQShortcutEvent" >QShortcutEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQShortcutEvent" >QShortcutEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QHideEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHideEvent" >QHideEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHideEvent" >QHideEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDragLeaveEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragLeaveEvent" >QDragLeaveEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragLeaveEvent" >QDragLeaveEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStatusTipEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStatusTipEvent" >QStatusTipEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStatusTipEvent" >QStatusTipEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QHelpEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHelpEvent" >QHelpEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHelpEvent" >QHelpEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QResizeEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQResizeEvent" >QResizeEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQResizeEvent" >QResizeEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFocusEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFocusEvent" >QFocusEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFocusEvent" >QFocusEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputMethodEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputMethodEvent" >QInputMethodEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputMethodEvent" >QInputMethodEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QActionEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQActionEvent" >QActionEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQActionEvent" >QActionEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QShowEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQShowEvent" >QShowEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQShowEvent" >QShowEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIconDragEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIconDragEvent" >QIconDragEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIconDragEvent" >QIconDragEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QToolBarChangeEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBarChangeEvent" >QToolBarChangeEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBarChangeEvent" >QToolBarChangeEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWhatsThisClickedEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWhatsThisClickedEvent" >QWhatsThisClickedEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWhatsThisClickedEvent" >QWhatsThisClickedEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QHoverEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHoverEvent" >QHoverEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHoverEvent" >QHoverEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintEvent" >QPaintEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintEvent" >QPaintEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWindowStateChangeEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWindowStateChangeEvent" >QWindowStateChangeEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWindowStateChangeEvent" >QWindowStateChangeEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDragEnterEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragEnterEvent" >QDragEnterEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragEnterEvent" >QDragEnterEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QProgressDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQProgressDialog" >QProgressDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQProgressDialog" >QProgressDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFontDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontDialog" >QFontDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontDialog" >QFontDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFileDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFileDialog" >QFileDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFileDialog" >QFileDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QErrorMessage (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQErrorMessage" >QErrorMessage</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQErrorMessage" >QErrorMessage</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMessageBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMessageBox" >QMessageBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMessageBox" >QMessageBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractPageSetupDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPageSetupDialog" >QAbstractPageSetupDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPageSetupDialog" >QAbstractPageSetupDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QColorDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColorDialog" >QColorDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColorDialog" >QColorDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDateEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateEdit" >QDateEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateEdit" >QDateEdit</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTimeEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTimeEdit" >QTimeEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTimeEdit" >QTimeEdit</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWindowsStyle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWindowsStyle" >QWindowsStyle</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWindowsStyle" >QWindowsStyle</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFontComboBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontComboBox" >QFontComboBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontComboBox" >QFontComboBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QHBoxLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHBoxLayout" >QHBoxLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHBoxLayout" >QHBoxLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QVBoxLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQVBoxLayout" >QVBoxLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQVBoxLayout" >QVBoxLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSpinBox" >QSpinBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSpinBox" >QSpinBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDoubleSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDoubleSpinBox" >QDoubleSpinBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDoubleSpinBox" >QDoubleSpinBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QScrollBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollBar" >QScrollBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollBar" >QScrollBar</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDial (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDial" >QDial</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDial" >QDial</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSlider (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSlider" >QSlider</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSlider" >QSlider</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollArea" >QScrollArea</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollArea" >QScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsView" >QGraphicsView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsView" >QGraphicsView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPrintDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrintDialog" >QPrintDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrintDialog" >QPrintDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QHeaderView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHeaderView" >QHeaderView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHeaderView" >QHeaderView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractProxyModel (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractProxyModel" >QAbstractProxyModel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractProxyModel" >QAbstractProxyModel</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStandardItemModel (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStandardItemModel" >QStandardItemModel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStandardItemModel" >QStandardItemModel</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDirModel (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDirModel" >QDirModel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDirModel" >QDirModel</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsPolygonItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPolygonItem" >QGraphicsPolygonItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPolygonItem" >QGraphicsPolygonItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsPathItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPathItem" >QGraphicsPathItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPathItem" >QGraphicsPathItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsRectItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsRectItem" >QGraphicsRectItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsRectItem" >QGraphicsRectItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSimpleTextItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSimpleTextItem" >QGraphicsSimpleTextItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSimpleTextItem" >QGraphicsSimpleTextItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsEllipseItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsEllipseItem" >QGraphicsEllipseItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsEllipseItem" >QGraphicsEllipseItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QToolButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolButton" >QToolButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolButton" >QToolButton</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCheckBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCheckBox" >QCheckBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCheckBox" >QCheckBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRadioButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRadioButton" >QRadioButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRadioButton" >QRadioButton</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPushButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPushButton" >QPushButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPushButton" >QPushButton</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFontMetricsF (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontMetricsF" >QFontMetricsF</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontMetricsF" >QFontMetricsF</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextLayout" >QTextLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextLayout" >QTextLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFont (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFont" >QFont</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFont" >QFont</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPalette (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPalette" >QPalette</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPalette" >QPalette</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextLength (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextLength" >QTextLength</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextLength" >QTextLength</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStandardItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStandardItem" >QStandardItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStandardItem" >QStandardItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTreeWidgetItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidgetItem" >QTreeWidgetItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidgetItem" >QTreeWidgetItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QKeySequence (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQKeySequence" >QKeySequence</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQKeySequence" >QKeySequence</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintEngine (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintEngine" >QPaintEngine</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintEngine" >QPaintEngine</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QColormap (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColormap" >QColormap</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColormap" >QColormap</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextLine (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextLine" >QTextLine</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextLine" >QTextLine</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCursor (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCursor" >QCursor</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCursor" >QCursor</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFontDatabase (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontDatabase" >QFontDatabase</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontDatabase" >QFontDatabase</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPainter (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPainter" >QPainter</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPainter" >QPainter</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextDocumentFragment (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextDocumentFragment" >QTextDocumentFragment</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextDocumentFragment" >QTextDocumentFragment</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTableWidgetSelectionRange (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidgetSelectionRange" >QTableWidgetSelectionRange</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidgetSelectionRange" >QTableWidgetSelectionRange</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextLayout__FormatRange (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextLayout__FormatRange" >QTextLayout__FormatRange</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextLayout__FormatRange" >QTextLayout__FormatRange</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QColor (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColor" >QColor</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColor" >QColor</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIcon (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIcon" >QIcon</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIcon" >QIcon</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextBlock (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlock" >QTextBlock</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlock" >QTextBlock</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRegion (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRegion" >QRegion</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRegion" >QRegion</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QUndoCommand (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoCommand" >QUndoCommand</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoCommand" >QUndoCommand</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QToolTip (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolTip" >QToolTip</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolTip" >QToolTip</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QItemSelection (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQItemSelection" >QItemSelection</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQItemSelection" >QItemSelection</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QListWidgetItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidgetItem" >QListWidgetItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidgetItem" >QListWidgetItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPen (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPen" >QPen</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPen" >QPen</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFontMetrics (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontMetrics" >QFontMetrics</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontMetrics" >QFontMetrics</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextTableCell (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTableCell" >QTextTableCell</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTableCell" >QTextTableCell</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFragment (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFragment" >QTextFragment</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFragment" >QTextFragment</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextCursor (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextCursor" >QTextCursor</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextCursor" >QTextCursor</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QBrush (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBrush" >QBrush</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBrush" >QBrush</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSizePolicy (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSizePolicy" >QSizePolicy</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSizePolicy" >QSizePolicy</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFontInfo (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontInfo" >QFontInfo</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontInfo" >QFontInfo</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPixmapCache (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPixmapCache" >QPixmapCache</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPixmapCache" >QPixmapCache</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleHintReturn (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleHintReturn" >QStyleHintReturn</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleHintReturn" >QStyleHintReturn</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextBlockUserData (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockUserData" >QTextBlockUserData</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockUserData" >QTextBlockUserData</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPainterPath (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPainterPath" >QPainterPath</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPainterPath" >QPainterPath</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTableWidgetItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidgetItem" >QTableWidgetItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidgetItem" >QTableWidgetItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFrameLayoutData (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrameLayoutData" >QTextFrameLayoutData</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrameLayoutData" >QTextFrameLayoutData</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextOption" >QTextOption</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextOption" >QTextOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QComboBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontComboBox" >QFontComboBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQComboBox" >QComboBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QComboBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQComboBox" >QComboBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQComboBox" >QComboBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTable" >QTextTable</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrame" >QTextFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrame" >QTextFrame</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrame" >QTextFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextBlockGroup (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextList" >QTextList</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockGroup" >QTextBlockGroup</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextBlockGroup (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockGroup" >QTextBlockGroup</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockGroup" >QTextBlockGroup</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextCharFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextImageFormat" >QTextImageFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextCharFormat" >QTextCharFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextCharFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextCharFormat" >QTextCharFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextCharFormat" >QTextCharFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFrameFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTableFormat" >QTextTableFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrameFormat" >QTextFrameFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFrameFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrameFormat" >QTextFrameFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrameFormat" >QTextFrameFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionViewItemV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV3" >QStyleOptionViewItemV3</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV2" >QStyleOptionViewItemV2</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionViewItemV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV2" >QStyleOptionViewItemV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV2" >QStyleOptionViewItemV2</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionToolBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBoxV2" >QStyleOptionToolBoxV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBox" >QStyleOptionToolBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionToolBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBox" >QStyleOptionToolBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBox" >QStyleOptionToolBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionTab (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabV2" >QStyleOptionTabV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTab" >QStyleOptionTab</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionTab (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTab" >QStyleOptionTab</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTab" >QStyleOptionTab</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrameV2" >QStyleOptionFrameV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrame" >QStyleOptionFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrame" >QStyleOptionFrame</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrame" >QStyleOptionFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionDockWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidgetV2" >QStyleOptionDockWidgetV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidget" >QStyleOptionDockWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionDockWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidget" >QStyleOptionDockWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidget" >QStyleOptionDockWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionProgressBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBarV2" >QStyleOptionProgressBarV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBar" >QStyleOptionProgressBar</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionProgressBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBar" >QStyleOptionProgressBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBar" >QStyleOptionProgressBar</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCommonStyle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWindowsStyle" >QWindowsStyle</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCommonStyle" >QCommonStyle</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCommonStyle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCommonStyle" >QCommonStyle</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCommonStyle" >QCommonStyle</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPixmap (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBitmap" >QBitmap</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPixmap" >QPixmap</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPixmap (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPixmap" >QPixmap</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPixmap" >QPixmap</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDragMoveEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragEnterEvent" >QDragEnterEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragMoveEvent" >QDragMoveEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDragMoveEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragMoveEvent" >QDragMoveEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragMoveEvent" >QDragMoveEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractPrintDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrintDialog" >QPrintDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPrintDialog" >QAbstractPrintDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractPrintDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPrintDialog" >QAbstractPrintDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPrintDialog" >QAbstractPrintDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBrowser" >QTextBrowser</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextEdit" >QTextEdit</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextEdit" >QTextEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextEdit" >QTextEdit</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTableView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableView" >QTableView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTableView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableView" >QTableView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableView" >QTableView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTreeView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeView" >QTreeView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTreeView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeView" >QTreeView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeView" >QTreeView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIconEngine (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIconEngineV2" >QIconEngineV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIconEngine" >QIconEngine</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIconEngine (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIconEngine" >QIconEngine</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIconEngine" >QIconEngine</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionViewItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV3" >QStyleOptionViewItemV3</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItem" >QStyleOptionViewItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionViewItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV2" >QStyleOptionViewItemV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItem" >QStyleOptionViewItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionViewItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItem" >QStyleOptionViewItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItem" >QStyleOptionViewItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWindowsStyle" >QWindowsStyle</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyle" >QStyle</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCommonStyle" >QCommonStyle</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyle" >QStyle</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyle" >QStyle</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyle" >QStyle</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QBoxLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHBoxLayout" >QHBoxLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBoxLayout" >QBoxLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QBoxLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQVBoxLayout" >QVBoxLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBoxLayout" >QBoxLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QBoxLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBoxLayout" >QBoxLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBoxLayout" >QBoxLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDropEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragEnterEvent" >QDragEnterEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDropEvent" >QDropEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDropEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragMoveEvent" >QDragMoveEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDropEvent" >QDropEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDropEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDropEvent" >QDropEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDropEvent" >QDropEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDateTimeEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateEdit" >QDateEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateTimeEdit" >QDateTimeEdit</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDateTimeEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTimeEdit" >QTimeEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateTimeEdit" >QDateTimeEdit</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDateTimeEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateTimeEdit" >QDateTimeEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateTimeEdit" >QDateTimeEdit</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QListView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QListView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QListView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMimeSource (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMimeSource" >QMimeSource</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMimeSource" >QMimeSource</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSlider (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollBar" >QScrollBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSlider" >QAbstractSlider</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSlider (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDial" >QDial</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSlider" >QAbstractSlider</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSlider (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSlider" >QSlider</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSlider" >QAbstractSlider</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSlider (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSlider" >QAbstractSlider</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSlider" >QAbstractSlider</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDoubleValidator" >QDoubleValidator</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQValidator" >QValidator</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIntValidator" >QIntValidator</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQValidator" >QValidator</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRegExpValidator" >QRegExpValidator</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQValidator" >QValidator</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQValidator" >QValidator</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQValidator" >QValidator</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRadialGradient" >QRadialGradient</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGradient" >QGradient</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQConicalGradient" >QConicalGradient</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGradient" >QGradient</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLinearGradient" >QLinearGradient</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGradient" >QGradient</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGradient" >QGradient</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGradient" >QGradient</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolButton" >QToolButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractButton" >QAbstractButton</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCheckBox" >QCheckBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractButton" >QAbstractButton</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRadioButton" >QRadioButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractButton" >QAbstractButton</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPushButton" >QPushButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractButton" >QAbstractButton</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractButton" >QAbstractButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractButton" >QAbstractButton</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextObject (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTable" >QTextTable</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextObject" >QTextObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextObject (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextList" >QTextList</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextObject" >QTextObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextObject (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrame" >QTextFrame</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextObject" >QTextObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextObject (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockGroup" >QTextBlockGroup</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextObject" >QTextObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextObject (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextObject" >QTextObject</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextObject" >QTextObject</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQContextMenuEvent" >QContextMenuEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputEvent" >QInputEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabletEvent" >QTabletEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputEvent" >QInputEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWheelEvent" >QWheelEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputEvent" >QInputEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQKeyEvent" >QKeyEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputEvent" >QInputEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMouseEvent" >QMouseEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputEvent" >QInputEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputEvent" >QInputEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputEvent" >QInputEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateEdit" >QDateEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSpinBox" >QAbstractSpinBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTimeEdit" >QTimeEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSpinBox" >QAbstractSpinBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSpinBox" >QSpinBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSpinBox" >QAbstractSpinBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDoubleSpinBox" >QDoubleSpinBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSpinBox" >QAbstractSpinBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateTimeEdit" >QDateTimeEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSpinBox" >QAbstractSpinBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSpinBox" >QAbstractSpinBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSpinBox" >QAbstractSpinBox</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStackedLayout" >QStackedLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLayout" >QLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGridLayout" >QGridLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLayout" >QLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHBoxLayout" >QHBoxLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLayout" >QLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQVBoxLayout" >QVBoxLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLayout" >QLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBoxLayout" >QBoxLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLayout" >QLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLayout" >QLayout</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLayout" >QLayout</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractGraphicsShapeItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPolygonItem" >QGraphicsPolygonItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractGraphicsShapeItem" >QAbstractGraphicsShapeItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractGraphicsShapeItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPathItem" >QGraphicsPathItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractGraphicsShapeItem" >QAbstractGraphicsShapeItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractGraphicsShapeItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsRectItem" >QGraphicsRectItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractGraphicsShapeItem" >QAbstractGraphicsShapeItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractGraphicsShapeItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSimpleTextItem" >QGraphicsSimpleTextItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractGraphicsShapeItem" >QAbstractGraphicsShapeItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractGraphicsShapeItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsEllipseItem" >QGraphicsEllipseItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractGraphicsShapeItem" >QAbstractGraphicsShapeItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractGraphicsShapeItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractGraphicsShapeItem" >QAbstractGraphicsShapeItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractGraphicsShapeItem" >QAbstractGraphicsShapeItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneWheelEvent" >QGraphicsSceneWheelEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneEvent" >QGraphicsSceneEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneDragDropEvent" >QGraphicsSceneDragDropEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneEvent" >QGraphicsSceneEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneMouseEvent" >QGraphicsSceneMouseEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneEvent" >QGraphicsSceneEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneContextMenuEvent" >QGraphicsSceneContextMenuEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneEvent" >QGraphicsSceneEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneHoverEvent" >QGraphicsSceneHoverEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneEvent" >QGraphicsSceneEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneHelpEvent" >QGraphicsSceneHelpEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneEvent" >QGraphicsSceneEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneEvent" >QGraphicsSceneEvent</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneEvent" >QGraphicsSceneEvent</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTableFormat" >QTextTableFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFormat" >QTextFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextListFormat" >QTextListFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFormat" >QTextFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockFormat" >QTextBlockFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFormat" >QTextFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextImageFormat" >QTextImageFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFormat" >QTextFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextCharFormat" >QTextCharFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFormat" >QTextFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrameFormat" >QTextFrameFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFormat" >QTextFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFormat" >QTextFormat</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFormat" >QTextFormat</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayoutItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSpacerItem" >QSpacerItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLayoutItem" >QLayoutItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayoutItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLayoutItem" >QLayoutItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLayoutItem" >QLayoutItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSizeGrip" >QStyleOptionSizeGrip</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComplex" >QStyleOptionComplex</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComboBox" >QStyleOptionComboBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComplex" >QStyleOptionComplex</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSpinBox" >QStyleOptionSpinBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComplex" >QStyleOptionComplex</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionGroupBox" >QStyleOptionGroupBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComplex" >QStyleOptionComplex</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTitleBar" >QStyleOptionTitleBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComplex" >QStyleOptionComplex</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSlider" >QStyleOptionSlider</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComplex" >QStyleOptionComplex</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolButton" >QStyleOptionToolButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComplex" >QStyleOptionComplex</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComplex" >QStyleOptionComplex</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComplex" >QStyleOptionComplex</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHeaderView" >QHeaderView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableView" >QTableView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeView" >QTreeView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQProgressDialog" >QProgressDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontDialog" >QFontDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFileDialog" >QFileDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQErrorMessage" >QErrorMessage</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMessageBox" >QMessageBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPageSetupDialog" >QAbstractPageSetupDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColorDialog" >QColorDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrintDialog" >QPrintDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPrintDialog" >QAbstractPrintDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItemGroup" >QGraphicsItemGroup</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItem" >QGraphicsItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPixmapItem" >QGraphicsPixmapItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItem" >QGraphicsItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsLineItem" >QGraphicsLineItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItem" >QGraphicsItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPolygonItem" >QGraphicsPolygonItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItem" >QGraphicsItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPathItem" >QGraphicsPathItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItem" >QGraphicsItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsRectItem" >QGraphicsRectItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItem" >QGraphicsItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSimpleTextItem" >QGraphicsSimpleTextItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItem" >QGraphicsItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsEllipseItem" >QGraphicsEllipseItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItem" >QGraphicsItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractGraphicsShapeItem" >QAbstractGraphicsShapeItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItem" >QGraphicsItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItem" >QGraphicsItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItem" >QGraphicsItem</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBrowser" >QTextBrowser</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollArea" >QScrollArea</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsView" >QGraphicsView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHeaderView" >QHeaderView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextEdit" >QTextEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableView" >QTableView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeView" >QTreeView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBrowser" >QTextBrowser</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplitter" >QSplitter</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStackedWidget" >QStackedWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLCDNumber" >QLCDNumber</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBox" >QToolBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLabel" >QLabel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollArea" >QScrollArea</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsView" >QGraphicsView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHeaderView" >QHeaderView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextEdit" >QTextEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableView" >QTableView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeView" >QTreeView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV3" >QStyleOptionViewItemV3</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBoxV2" >QStyleOptionToolBoxV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabV2" >QStyleOptionTabV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBarV2" >QStyleOptionProgressBarV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrameV2" >QStyleOptionFrameV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidgetV2" >QStyleOptionDockWidgetV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSizeGrip" >QStyleOptionSizeGrip</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComboBox" >QStyleOptionComboBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSpinBox" >QStyleOptionSpinBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionGroupBox" >QStyleOptionGroupBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTitleBar" >QStyleOptionTitleBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSlider" >QStyleOptionSlider</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolButton" >QStyleOptionToolButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionButton" >QStyleOptionButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionMenuItem" >QStyleOptionMenuItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabWidgetFrame" >QStyleOptionTabWidgetFrame</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFocusRect" >QStyleOptionFocusRect</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabBarBase" >QStyleOptionTabBarBase</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionHeader" >QStyleOptionHeader</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBar" >QStyleOptionToolBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionGraphicsItem" >QStyleOptionGraphicsItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionRubberBand" >QStyleOptionRubberBand</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV2" >QStyleOptionViewItemV2</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBox" >QStyleOptionToolBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTab" >QStyleOptionTab</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrame" >QStyleOptionFrame</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidget" >QStyleOptionDockWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBar" >QStyleOptionProgressBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItem" >QStyleOptionViewItem</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComplex" >QStyleOptionComplex</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBar" >QToolBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGroupBox" >QGroupBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabBar" >QTabBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStatusBar" >QStatusBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSizeGrip" >QSizeGrip</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDockWidget" >QDockWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMenuBar" >QMenuBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRubberBand" >QRubberBand</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialogButtonBox" >QDialogButtonBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQProgressBar" >QProgressBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabWidget" >QTabWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplashScreen" >QSplashScreen</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFocusFrame" >QFocusFrame</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMainWindow" >QMainWindow</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplitterHandle" >QSplitterHandle</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDesktopWidget" >QDesktopWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLineEdit" >QLineEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCalendarWidget" >QCalendarWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMenu" >QMenu</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBrowser" >QTextBrowser</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplitter" >QSplitter</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStackedWidget" >QStackedWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLCDNumber" >QLCDNumber</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBox" >QToolBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLabel" >QLabel</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQProgressDialog" >QProgressDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontDialog" >QFontDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFileDialog" >QFileDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQErrorMessage" >QErrorMessage</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMessageBox" >QMessageBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPageSetupDialog" >QAbstractPageSetupDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColorDialog" >QColorDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateEdit" >QDateEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTimeEdit" >QTimeEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontComboBox" >QFontComboBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSpinBox" >QSpinBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDoubleSpinBox" >QDoubleSpinBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollBar" >QScrollBar</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDial" >QDial</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSlider" >QSlider</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollArea" >QScrollArea</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsView" >QGraphicsView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrintDialog" >QPrintDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHeaderView" >QHeaderView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolButton" >QToolButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCheckBox" >QCheckBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRadioButton" >QRadioButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPushButton" >QPushButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQComboBox" >QComboBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPrintDialog" >QAbstractPrintDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextEdit" >QTextEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableView" >QTableView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeView" >QTreeView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateTimeEdit" >QDateTimeEdit</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSlider" >QAbstractSlider</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractButton" >QAbstractButton</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSpinBox" >QAbstractSpinBox</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintDevice (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBitmap" >QBitmap</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintDevice" >QPaintDevice</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintDevice (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQImage" >QImage</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintDevice" >QPaintDevice</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintDevice (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrinter" >QPrinter</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintDevice" >QPaintDevice</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintDevice (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPicture" >QPicture</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintDevice" >QPaintDevice</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintDevice (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPixmap" >QPixmap</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintDevice" >QPaintDevice</A > ()))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintDevice (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintDevice" >QPaintDevice</A > ()) ([] (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintDevice" >QPaintDevice</A > ()))</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="Qtc-Core-Base.html#t%3AQqpoints" >Qqpoints</A > (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPolygon" >QPolygon</A > ()) (IO ([] <A HREF="Qth-ClassTypes-Core-Point.html#t%3APoint" >Point</A >))</TD ></TR ><TR ><TD CLASS="decl" ><A HREF="Qtc-Core-Base.html#t%3AQqpoints" >Qqpoints</A > (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPolygonF" >QPolygonF</A > ()) (IO ([] <A HREF="Qth-ClassTypes-Core-Point.html#t%3APointF" >PointF</A >))</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTimeLine a r =&gt; QqCastList_QTimeLine (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimeLine" >QTimeLine</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTimer a r =&gt; QqCastList_QTimer (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimer" >QTimer</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTranslator a r =&gt; QqCastList_QTranslator (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTranslator" >QTranslator</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMimeData a r =&gt; QqCastList_QMimeData (<A HREF="Qtc-ClassTypes-Core.html#t%3AQMimeData" >QMimeData</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QEventLoop a r =&gt; QqCastList_QEventLoop (<A HREF="Qtc-ClassTypes-Core.html#t%3AQEventLoop" >QEventLoop</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFile a r =&gt; QqCastList_QFile (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFile" >QFile</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFileOpenEvent a r =&gt; QqCastList_QFileOpenEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFileOpenEvent" >QFileOpenEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QChildEvent a r =&gt; QqCastList_QChildEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQChildEvent" >QChildEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDynamicPropertyChangeEvent a r =&gt; QqCastList_QDynamicPropertyChangeEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDynamicPropertyChangeEvent" >QDynamicPropertyChangeEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTimerEvent a r =&gt; QqCastList_QTimerEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimerEvent" >QTimerEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractListModel a r =&gt; QqCastList_QAbstractListModel (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractListModel" >QAbstractListModel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractTableModel a r =&gt; QqCastList_QAbstractTableModel (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractTableModel" >QAbstractTableModel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPolygon a r =&gt; QqCastList_QPolygon (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPolygon" >QPolygon</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLine a r =&gt; QqCastList_QLine (<A HREF="Qtc-ClassTypes-Core.html#t%3AQLine" >QLine</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRegExp a r =&gt; QqCastList_QRegExp (<A HREF="Qtc-ClassTypes-Core.html#t%3AQRegExp" >QRegExp</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRect a r =&gt; QqCastList_QRect (<A HREF="Qtc-ClassTypes-Core.html#t%3AQRect" >QRect</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QVariant a r =&gt; QqCastList_QVariant (<A HREF="Qtc-ClassTypes-Core.html#t%3AQVariant" >QVariant</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPolygonF a r =&gt; QqCastList_QPolygonF (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPolygonF" >QPolygonF</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractFileEngine a r =&gt; QqCastList_QAbstractFileEngine (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractFileEngine" >QAbstractFileEngine</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QChar a r =&gt; QqCastList_QChar (<A HREF="Qtc-ClassTypes-Core.html#t%3AQChar" >QChar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDir a r =&gt; QqCastList_QDir (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDir" >QDir</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLocale a r =&gt; QqCastList_QLocale (<A HREF="Qtc-ClassTypes-Core.html#t%3AQLocale" >QLocale</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QUuid a r =&gt; QqCastList_QUuid (<A HREF="Qtc-ClassTypes-Core.html#t%3AQUuid" >QUuid</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextStream a r =&gt; QqCastList_QTextStream (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTextStream" >QTextStream</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMatrix a r =&gt; QqCastList_QMatrix (<A HREF="Qtc-ClassTypes-Core.html#t%3AQMatrix" >QMatrix</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPoint a r =&gt; QqCastList_QPoint (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPoint" >QPoint</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QModelIndex a r =&gt; QqCastList_QModelIndex (<A HREF="Qtc-ClassTypes-Core.html#t%3AQModelIndex" >QModelIndex</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDataStream a r =&gt; QqCastList_QDataStream (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDataStream" >QDataStream</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QBasicTimer a r =&gt; QqCastList_QBasicTimer (<A HREF="Qtc-ClassTypes-Core.html#t%3AQBasicTimer" >QBasicTimer</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSizeF a r =&gt; QqCastList_QSizeF (<A HREF="Qtc-ClassTypes-Core.html#t%3AQSizeF" >QSizeF</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QUrl a r =&gt; QqCastList_QUrl (<A HREF="Qtc-ClassTypes-Core.html#t%3AQUrl" >QUrl</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDateTime a r =&gt; QqCastList_QDateTime (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDateTime" >QDateTime</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRectF a r =&gt; QqCastList_QRectF (<A HREF="Qtc-ClassTypes-Core.html#t%3AQRectF" >QRectF</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSize a r =&gt; QqCastList_QSize (<A HREF="Qtc-ClassTypes-Core.html#t%3AQSize" >QSize</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPointF a r =&gt; QqCastList_QPointF (<A HREF="Qtc-ClassTypes-Core.html#t%3AQPointF" >QPointF</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTime a r =&gt; QqCastList_QTime (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTime" >QTime</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDate a r =&gt; QqCastList_QDate (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDate" >QDate</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFileInfo a r =&gt; QqCastList_QFileInfo (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFileInfo" >QFileInfo</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_Qt a r =&gt; QqCastList_Qt (<A HREF="Qtc-ClassTypes-Core.html#t%3AQt" >Qt</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLineF a r =&gt; QqCastList_QLineF (<A HREF="Qtc-ClassTypes-Core.html#t%3AQLineF" >QLineF</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextCodec a r =&gt; QqCastList_QTextCodec (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTextCodec" >QTextCodec</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIODevice a r =&gt; QqCastList_QIODevice (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFile" >QFile</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIODevice a r =&gt; QqCastList_QIODevice (<A HREF="Qtc-ClassTypes-Core.html#t%3AQIODevice" >QIODevice</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemModel a r =&gt; QqCastList_QAbstractItemModel (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractListModel" >QAbstractListModel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemModel a r =&gt; QqCastList_QAbstractItemModel (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractTableModel" >QAbstractTableModel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemModel a r =&gt; QqCastList_QAbstractItemModel (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractItemModel" >QAbstractItemModel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QEvent a r =&gt; QqCastList_QEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFileOpenEvent" >QFileOpenEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QEvent a r =&gt; QqCastList_QEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQChildEvent" >QChildEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QEvent a r =&gt; QqCastList_QEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQDynamicPropertyChangeEvent" >QDynamicPropertyChangeEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QEvent a r =&gt; QqCastList_QEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimerEvent" >QTimerEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QEvent a r =&gt; QqCastList_QEvent (<A HREF="Qtc-ClassTypes-Core.html#t%3AQEvent" >QEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject a r =&gt; QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimeLine" >QTimeLine</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject a r =&gt; QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTimer" >QTimer</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject a r =&gt; QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQCoreApplication" >QCoreApplication</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject a r =&gt; QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQTranslator" >QTranslator</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject a r =&gt; QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQMimeData" >QMimeData</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject a r =&gt; QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQEventLoop" >QEventLoop</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject a r =&gt; QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQFile" >QFile</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject a r =&gt; QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractListModel" >QAbstractListModel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject a r =&gt; QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractTableModel" >QAbstractTableModel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject a r =&gt; QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQIODevice" >QIODevice</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject a r =&gt; QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQAbstractItemModel" >QAbstractItemModel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QObject a r =&gt; QqCastList_QObject (<A HREF="Qtc-ClassTypes-Core.html#t%3AQObject" >QObject</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QToolBar a r =&gt; QqCastList_QToolBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBar" >QToolBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGroupBox a r =&gt; QqCastList_QGroupBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGroupBox" >QGroupBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTabBar a r =&gt; QqCastList_QTabBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabBar" >QTabBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStatusBar a r =&gt; QqCastList_QStatusBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStatusBar" >QStatusBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSizeGrip a r =&gt; QqCastList_QSizeGrip (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSizeGrip" >QSizeGrip</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDockWidget a r =&gt; QqCastList_QDockWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDockWidget" >QDockWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMenuBar a r =&gt; QqCastList_QMenuBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMenuBar" >QMenuBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRubberBand a r =&gt; QqCastList_QRubberBand (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRubberBand" >QRubberBand</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialogButtonBox a r =&gt; QqCastList_QDialogButtonBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialogButtonBox" >QDialogButtonBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QProgressBar a r =&gt; QqCastList_QProgressBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQProgressBar" >QProgressBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTabWidget a r =&gt; QqCastList_QTabWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabWidget" >QTabWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSplashScreen a r =&gt; QqCastList_QSplashScreen (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplashScreen" >QSplashScreen</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFocusFrame a r =&gt; QqCastList_QFocusFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFocusFrame" >QFocusFrame</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMainWindow a r =&gt; QqCastList_QMainWindow (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMainWindow" >QMainWindow</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSplitterHandle a r =&gt; QqCastList_QSplitterHandle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplitterHandle" >QSplitterHandle</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDesktopWidget a r =&gt; QqCastList_QDesktopWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDesktopWidget" >QDesktopWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLineEdit a r =&gt; QqCastList_QLineEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLineEdit" >QLineEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCalendarWidget a r =&gt; QqCastList_QCalendarWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCalendarWidget" >QCalendarWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMenu a r =&gt; QqCastList_QMenu (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMenu" >QMenu</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDoubleValidator a r =&gt; QqCastList_QDoubleValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDoubleValidator" >QDoubleValidator</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIntValidator a r =&gt; QqCastList_QIntValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIntValidator" >QIntValidator</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRegExpValidator a r =&gt; QqCastList_QRegExpValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRegExpValidator" >QRegExpValidator</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTreeWidget a r =&gt; QqCastList_QTreeWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextTableFormat a r =&gt; QqCastList_QTextTableFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTableFormat" >QTextTableFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextTable a r =&gt; QqCastList_QTextTable (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTable" >QTextTable</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextListFormat a r =&gt; QqCastList_QTextListFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextListFormat" >QTextListFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextBlockFormat a r =&gt; QqCastList_QTextBlockFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockFormat" >QTextBlockFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextBrowser a r =&gt; QqCastList_QTextBrowser (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBrowser" >QTextBrowser</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextImageFormat a r =&gt; QqCastList_QTextImageFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextImageFormat" >QTextImageFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextList a r =&gt; QqCastList_QTextList (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextList" >QTextList</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTableWidget a r =&gt; QqCastList_QTableWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionViewItemV3 a r =&gt; QqCastList_QStyleOptionViewItemV3 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV3" >QStyleOptionViewItemV3</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionToolBoxV2 a r =&gt; QqCastList_QStyleOptionToolBoxV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBoxV2" >QStyleOptionToolBoxV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionTabV2 a r =&gt; QqCastList_QStyleOptionTabV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabV2" >QStyleOptionTabV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionProgressBarV2 a r =&gt; QqCastList_QStyleOptionProgressBarV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBarV2" >QStyleOptionProgressBarV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionFrameV2 a r =&gt; QqCastList_QStyleOptionFrameV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrameV2" >QStyleOptionFrameV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionDockWidgetV2 a r =&gt; QqCastList_QStyleOptionDockWidgetV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidgetV2" >QStyleOptionDockWidgetV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionSizeGrip a r =&gt; QqCastList_QStyleOptionSizeGrip (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSizeGrip" >QStyleOptionSizeGrip</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComboBox a r =&gt; QqCastList_QStyleOptionComboBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComboBox" >QStyleOptionComboBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionSpinBox a r =&gt; QqCastList_QStyleOptionSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSpinBox" >QStyleOptionSpinBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionGroupBox a r =&gt; QqCastList_QStyleOptionGroupBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionGroupBox" >QStyleOptionGroupBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionTitleBar a r =&gt; QqCastList_QStyleOptionTitleBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTitleBar" >QStyleOptionTitleBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionSlider a r =&gt; QqCastList_QStyleOptionSlider (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSlider" >QStyleOptionSlider</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionToolButton a r =&gt; QqCastList_QStyleOptionToolButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolButton" >QStyleOptionToolButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionButton a r =&gt; QqCastList_QStyleOptionButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionButton" >QStyleOptionButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionMenuItem a r =&gt; QqCastList_QStyleOptionMenuItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionMenuItem" >QStyleOptionMenuItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionTabWidgetFrame a r =&gt; QqCastList_QStyleOptionTabWidgetFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabWidgetFrame" >QStyleOptionTabWidgetFrame</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionFocusRect a r =&gt; QqCastList_QStyleOptionFocusRect (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFocusRect" >QStyleOptionFocusRect</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionTabBarBase a r =&gt; QqCastList_QStyleOptionTabBarBase (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabBarBase" >QStyleOptionTabBarBase</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionHeader a r =&gt; QqCastList_QStyleOptionHeader (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionHeader" >QStyleOptionHeader</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionToolBar a r =&gt; QqCastList_QStyleOptionToolBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBar" >QStyleOptionToolBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionGraphicsItem a r =&gt; QqCastList_QStyleOptionGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionGraphicsItem" >QStyleOptionGraphicsItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionRubberBand a r =&gt; QqCastList_QStyleOptionRubberBand (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionRubberBand" >QStyleOptionRubberBand</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QBitmap a r =&gt; QqCastList_QBitmap (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBitmap" >QBitmap</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QImage a r =&gt; QqCastList_QImage (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQImage" >QImage</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPrinter a r =&gt; QqCastList_QPrinter (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrinter" >QPrinter</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPicture a r =&gt; QqCastList_QPicture (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPicture" >QPicture</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QItemSelectionModel a r =&gt; QqCastList_QItemSelectionModel (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQItemSelectionModel" >QItemSelectionModel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QActionGroup a r =&gt; QqCastList_QActionGroup (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQActionGroup" >QActionGroup</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsTextItem a r =&gt; QqCastList_QGraphicsTextItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsTextItem" >QGraphicsTextItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QUndoGroup a r =&gt; QqCastList_QUndoGroup (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoGroup" >QUndoGroup</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsScene a r =&gt; QqCastList_QGraphicsScene (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsScene" >QGraphicsScene</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QClipboard a r =&gt; QqCastList_QClipboard (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQClipboard" >QClipboard</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSystemTrayIcon a r =&gt; QqCastList_QSystemTrayIcon (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSystemTrayIcon" >QSystemTrayIcon</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDataWidgetMapper a r =&gt; QqCastList_QDataWidgetMapper (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDataWidgetMapper" >QDataWidgetMapper</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractTextDocumentLayout a r =&gt; QqCastList_QAbstractTextDocumentLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractTextDocumentLayout" >QAbstractTextDocumentLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputContext a r =&gt; QqCastList_QInputContext (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputContext" >QInputContext</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QUndoStack a r =&gt; QqCastList_QUndoStack (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoStack" >QUndoStack</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCompleter a r =&gt; QqCastList_QCompleter (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCompleter" >QCompleter</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSyntaxHighlighter a r =&gt; QqCastList_QSyntaxHighlighter (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSyntaxHighlighter" >QSyntaxHighlighter</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemDelegate a r =&gt; QqCastList_QAbstractItemDelegate (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemDelegate" >QAbstractItemDelegate</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSound a r =&gt; QqCastList_QSound (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSound" >QSound</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QShortcut a r =&gt; QqCastList_QShortcut (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQShortcut" >QShortcut</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDrag a r =&gt; QqCastList_QDrag (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDrag" >QDrag</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QButtonGroup a r =&gt; QqCastList_QButtonGroup (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQButtonGroup" >QButtonGroup</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAction a r =&gt; QqCastList_QAction (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAction" >QAction</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMovie a r =&gt; QqCastList_QMovie (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMovie" >QMovie</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextDocument a r =&gt; QqCastList_QTextDocument (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextDocument" >QTextDocument</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItemAnimation a r =&gt; QqCastList_QGraphicsItemAnimation (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItemAnimation" >QGraphicsItemAnimation</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QUndoView a r =&gt; QqCastList_QUndoView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QListWidget a r =&gt; QqCastList_QListWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSpacerItem a r =&gt; QqCastList_QSpacerItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSpacerItem" >QSpacerItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStackedLayout a r =&gt; QqCastList_QStackedLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStackedLayout" >QStackedLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGridLayout a r =&gt; QqCastList_QGridLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGridLayout" >QGridLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QContextMenuEvent a r =&gt; QqCastList_QContextMenuEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQContextMenuEvent" >QContextMenuEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTabletEvent a r =&gt; QqCastList_QTabletEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabletEvent" >QTabletEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWheelEvent a r =&gt; QqCastList_QWheelEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWheelEvent" >QWheelEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QKeyEvent a r =&gt; QqCastList_QKeyEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQKeyEvent" >QKeyEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMouseEvent a r =&gt; QqCastList_QMouseEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMouseEvent" >QMouseEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIconEngineV2 a r =&gt; QqCastList_QIconEngineV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIconEngineV2" >QIconEngineV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneWheelEvent a r =&gt; QqCastList_QGraphicsSceneWheelEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneWheelEvent" >QGraphicsSceneWheelEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneDragDropEvent a r =&gt; QqCastList_QGraphicsSceneDragDropEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneDragDropEvent" >QGraphicsSceneDragDropEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneMouseEvent a r =&gt; QqCastList_QGraphicsSceneMouseEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneMouseEvent" >QGraphicsSceneMouseEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneContextMenuEvent a r =&gt; QqCastList_QGraphicsSceneContextMenuEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneContextMenuEvent" >QGraphicsSceneContextMenuEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneHoverEvent a r =&gt; QqCastList_QGraphicsSceneHoverEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneHoverEvent" >QGraphicsSceneHoverEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneHelpEvent a r =&gt; QqCastList_QGraphicsSceneHelpEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneHelpEvent" >QGraphicsSceneHelpEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItemGroup a r =&gt; QqCastList_QGraphicsItemGroup (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItemGroup" >QGraphicsItemGroup</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsPixmapItem a r =&gt; QqCastList_QGraphicsPixmapItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPixmapItem" >QGraphicsPixmapItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsLineItem a r =&gt; QqCastList_QGraphicsLineItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsLineItem" >QGraphicsLineItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRadialGradient a r =&gt; QqCastList_QRadialGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRadialGradient" >QRadialGradient</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QConicalGradient a r =&gt; QqCastList_QConicalGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQConicalGradient" >QConicalGradient</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLinearGradient a r =&gt; QqCastList_QLinearGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLinearGradient" >QLinearGradient</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSplitter a r =&gt; QqCastList_QSplitter (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplitter" >QSplitter</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStackedWidget a r =&gt; QqCastList_QStackedWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStackedWidget" >QStackedWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLCDNumber a r =&gt; QqCastList_QLCDNumber (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLCDNumber" >QLCDNumber</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QToolBox a r =&gt; QqCastList_QToolBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBox" >QToolBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLabel a r =&gt; QqCastList_QLabel (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLabel" >QLabel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMoveEvent a r =&gt; QqCastList_QMoveEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMoveEvent" >QMoveEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCloseEvent a r =&gt; QqCastList_QCloseEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCloseEvent" >QCloseEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QShortcutEvent a r =&gt; QqCastList_QShortcutEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQShortcutEvent" >QShortcutEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QHideEvent a r =&gt; QqCastList_QHideEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHideEvent" >QHideEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDragLeaveEvent a r =&gt; QqCastList_QDragLeaveEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragLeaveEvent" >QDragLeaveEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStatusTipEvent a r =&gt; QqCastList_QStatusTipEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStatusTipEvent" >QStatusTipEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QHelpEvent a r =&gt; QqCastList_QHelpEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHelpEvent" >QHelpEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QResizeEvent a r =&gt; QqCastList_QResizeEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQResizeEvent" >QResizeEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFocusEvent a r =&gt; QqCastList_QFocusEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFocusEvent" >QFocusEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputMethodEvent a r =&gt; QqCastList_QInputMethodEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputMethodEvent" >QInputMethodEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QActionEvent a r =&gt; QqCastList_QActionEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQActionEvent" >QActionEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QShowEvent a r =&gt; QqCastList_QShowEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQShowEvent" >QShowEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIconDragEvent a r =&gt; QqCastList_QIconDragEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIconDragEvent" >QIconDragEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QToolBarChangeEvent a r =&gt; QqCastList_QToolBarChangeEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBarChangeEvent" >QToolBarChangeEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWhatsThisClickedEvent a r =&gt; QqCastList_QWhatsThisClickedEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWhatsThisClickedEvent" >QWhatsThisClickedEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QHoverEvent a r =&gt; QqCastList_QHoverEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHoverEvent" >QHoverEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintEvent a r =&gt; QqCastList_QPaintEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintEvent" >QPaintEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWindowStateChangeEvent a r =&gt; QqCastList_QWindowStateChangeEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWindowStateChangeEvent" >QWindowStateChangeEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDragEnterEvent a r =&gt; QqCastList_QDragEnterEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragEnterEvent" >QDragEnterEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QProgressDialog a r =&gt; QqCastList_QProgressDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQProgressDialog" >QProgressDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFontDialog a r =&gt; QqCastList_QFontDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontDialog" >QFontDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFileDialog a r =&gt; QqCastList_QFileDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFileDialog" >QFileDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QErrorMessage a r =&gt; QqCastList_QErrorMessage (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQErrorMessage" >QErrorMessage</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMessageBox a r =&gt; QqCastList_QMessageBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMessageBox" >QMessageBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractPageSetupDialog a r =&gt; QqCastList_QAbstractPageSetupDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPageSetupDialog" >QAbstractPageSetupDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QColorDialog a r =&gt; QqCastList_QColorDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColorDialog" >QColorDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDateEdit a r =&gt; QqCastList_QDateEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateEdit" >QDateEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTimeEdit a r =&gt; QqCastList_QTimeEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTimeEdit" >QTimeEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWindowsStyle a r =&gt; QqCastList_QWindowsStyle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWindowsStyle" >QWindowsStyle</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFontComboBox a r =&gt; QqCastList_QFontComboBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontComboBox" >QFontComboBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QHBoxLayout a r =&gt; QqCastList_QHBoxLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHBoxLayout" >QHBoxLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QVBoxLayout a r =&gt; QqCastList_QVBoxLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQVBoxLayout" >QVBoxLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSpinBox a r =&gt; QqCastList_QSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSpinBox" >QSpinBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDoubleSpinBox a r =&gt; QqCastList_QDoubleSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDoubleSpinBox" >QDoubleSpinBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QScrollBar a r =&gt; QqCastList_QScrollBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollBar" >QScrollBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDial a r =&gt; QqCastList_QDial (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDial" >QDial</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSlider a r =&gt; QqCastList_QSlider (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSlider" >QSlider</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QScrollArea a r =&gt; QqCastList_QScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollArea" >QScrollArea</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsView a r =&gt; QqCastList_QGraphicsView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsView" >QGraphicsView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPrintDialog a r =&gt; QqCastList_QPrintDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrintDialog" >QPrintDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QHeaderView a r =&gt; QqCastList_QHeaderView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHeaderView" >QHeaderView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractProxyModel a r =&gt; QqCastList_QAbstractProxyModel (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractProxyModel" >QAbstractProxyModel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStandardItemModel a r =&gt; QqCastList_QStandardItemModel (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStandardItemModel" >QStandardItemModel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDirModel a r =&gt; QqCastList_QDirModel (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDirModel" >QDirModel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsPolygonItem a r =&gt; QqCastList_QGraphicsPolygonItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPolygonItem" >QGraphicsPolygonItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsPathItem a r =&gt; QqCastList_QGraphicsPathItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPathItem" >QGraphicsPathItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsRectItem a r =&gt; QqCastList_QGraphicsRectItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsRectItem" >QGraphicsRectItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSimpleTextItem a r =&gt; QqCastList_QGraphicsSimpleTextItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSimpleTextItem" >QGraphicsSimpleTextItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsEllipseItem a r =&gt; QqCastList_QGraphicsEllipseItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsEllipseItem" >QGraphicsEllipseItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QToolButton a r =&gt; QqCastList_QToolButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolButton" >QToolButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCheckBox a r =&gt; QqCastList_QCheckBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCheckBox" >QCheckBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRadioButton a r =&gt; QqCastList_QRadioButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRadioButton" >QRadioButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPushButton a r =&gt; QqCastList_QPushButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPushButton" >QPushButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFontMetricsF a r =&gt; QqCastList_QFontMetricsF (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontMetricsF" >QFontMetricsF</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextLayout a r =&gt; QqCastList_QTextLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextLayout" >QTextLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFont a r =&gt; QqCastList_QFont (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFont" >QFont</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPalette a r =&gt; QqCastList_QPalette (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPalette" >QPalette</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextLength a r =&gt; QqCastList_QTextLength (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextLength" >QTextLength</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStandardItem a r =&gt; QqCastList_QStandardItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStandardItem" >QStandardItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTreeWidgetItem a r =&gt; QqCastList_QTreeWidgetItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidgetItem" >QTreeWidgetItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QKeySequence a r =&gt; QqCastList_QKeySequence (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQKeySequence" >QKeySequence</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintEngine a r =&gt; QqCastList_QPaintEngine (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintEngine" >QPaintEngine</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QColormap a r =&gt; QqCastList_QColormap (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColormap" >QColormap</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextLine a r =&gt; QqCastList_QTextLine (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextLine" >QTextLine</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCursor a r =&gt; QqCastList_QCursor (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCursor" >QCursor</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFontDatabase a r =&gt; QqCastList_QFontDatabase (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontDatabase" >QFontDatabase</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPainter a r =&gt; QqCastList_QPainter (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPainter" >QPainter</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextDocumentFragment a r =&gt; QqCastList_QTextDocumentFragment (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextDocumentFragment" >QTextDocumentFragment</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTableWidgetSelectionRange a r =&gt; QqCastList_QTableWidgetSelectionRange (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidgetSelectionRange" >QTableWidgetSelectionRange</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextLayout__FormatRange a r =&gt; QqCastList_QTextLayout__FormatRange (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextLayout__FormatRange" >QTextLayout__FormatRange</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QColor a r =&gt; QqCastList_QColor (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColor" >QColor</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIcon a r =&gt; QqCastList_QIcon (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIcon" >QIcon</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextBlock a r =&gt; QqCastList_QTextBlock (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlock" >QTextBlock</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QRegion a r =&gt; QqCastList_QRegion (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRegion" >QRegion</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QUndoCommand a r =&gt; QqCastList_QUndoCommand (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoCommand" >QUndoCommand</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QToolTip a r =&gt; QqCastList_QToolTip (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolTip" >QToolTip</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QItemSelection a r =&gt; QqCastList_QItemSelection (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQItemSelection" >QItemSelection</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QListWidgetItem a r =&gt; QqCastList_QListWidgetItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidgetItem" >QListWidgetItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPen a r =&gt; QqCastList_QPen (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPen" >QPen</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFontMetrics a r =&gt; QqCastList_QFontMetrics (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontMetrics" >QFontMetrics</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextTableCell a r =&gt; QqCastList_QTextTableCell (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTableCell" >QTextTableCell</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFragment a r =&gt; QqCastList_QTextFragment (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFragment" >QTextFragment</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextCursor a r =&gt; QqCastList_QTextCursor (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextCursor" >QTextCursor</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QBrush a r =&gt; QqCastList_QBrush (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBrush" >QBrush</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QSizePolicy a r =&gt; QqCastList_QSizePolicy (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSizePolicy" >QSizePolicy</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFontInfo a r =&gt; QqCastList_QFontInfo (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontInfo" >QFontInfo</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPixmapCache a r =&gt; QqCastList_QPixmapCache (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPixmapCache" >QPixmapCache</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleHintReturn a r =&gt; QqCastList_QStyleHintReturn (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleHintReturn" >QStyleHintReturn</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextBlockUserData a r =&gt; QqCastList_QTextBlockUserData (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockUserData" >QTextBlockUserData</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPainterPath a r =&gt; QqCastList_QPainterPath (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPainterPath" >QPainterPath</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTableWidgetItem a r =&gt; QqCastList_QTableWidgetItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidgetItem" >QTableWidgetItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFrameLayoutData a r =&gt; QqCastList_QTextFrameLayoutData (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrameLayoutData" >QTextFrameLayoutData</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextOption a r =&gt; QqCastList_QTextOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextOption" >QTextOption</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QComboBox a r =&gt; QqCastList_QComboBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontComboBox" >QFontComboBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QComboBox a r =&gt; QqCastList_QComboBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQComboBox" >QComboBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFrame a r =&gt; QqCastList_QTextFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTable" >QTextTable</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFrame a r =&gt; QqCastList_QTextFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrame" >QTextFrame</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextBlockGroup a r =&gt; QqCastList_QTextBlockGroup (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextList" >QTextList</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextBlockGroup a r =&gt; QqCastList_QTextBlockGroup (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockGroup" >QTextBlockGroup</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextCharFormat a r =&gt; QqCastList_QTextCharFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextImageFormat" >QTextImageFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextCharFormat a r =&gt; QqCastList_QTextCharFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextCharFormat" >QTextCharFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFrameFormat a r =&gt; QqCastList_QTextFrameFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTableFormat" >QTextTableFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFrameFormat a r =&gt; QqCastList_QTextFrameFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrameFormat" >QTextFrameFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionViewItemV2 a r =&gt; QqCastList_QStyleOptionViewItemV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV3" >QStyleOptionViewItemV3</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionViewItemV2 a r =&gt; QqCastList_QStyleOptionViewItemV2 (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV2" >QStyleOptionViewItemV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionToolBox a r =&gt; QqCastList_QStyleOptionToolBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBoxV2" >QStyleOptionToolBoxV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionToolBox a r =&gt; QqCastList_QStyleOptionToolBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBox" >QStyleOptionToolBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionTab a r =&gt; QqCastList_QStyleOptionTab (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabV2" >QStyleOptionTabV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionTab a r =&gt; QqCastList_QStyleOptionTab (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTab" >QStyleOptionTab</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionFrame a r =&gt; QqCastList_QStyleOptionFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrameV2" >QStyleOptionFrameV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionFrame a r =&gt; QqCastList_QStyleOptionFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrame" >QStyleOptionFrame</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionDockWidget a r =&gt; QqCastList_QStyleOptionDockWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidgetV2" >QStyleOptionDockWidgetV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionDockWidget a r =&gt; QqCastList_QStyleOptionDockWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidget" >QStyleOptionDockWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionProgressBar a r =&gt; QqCastList_QStyleOptionProgressBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBarV2" >QStyleOptionProgressBarV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionProgressBar a r =&gt; QqCastList_QStyleOptionProgressBar (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBar" >QStyleOptionProgressBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCommonStyle a r =&gt; QqCastList_QCommonStyle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWindowsStyle" >QWindowsStyle</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QCommonStyle a r =&gt; QqCastList_QCommonStyle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCommonStyle" >QCommonStyle</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPixmap a r =&gt; QqCastList_QPixmap (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBitmap" >QBitmap</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPixmap a r =&gt; QqCastList_QPixmap (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPixmap" >QPixmap</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDragMoveEvent a r =&gt; QqCastList_QDragMoveEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragEnterEvent" >QDragEnterEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDragMoveEvent a r =&gt; QqCastList_QDragMoveEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragMoveEvent" >QDragMoveEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractPrintDialog a r =&gt; QqCastList_QAbstractPrintDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrintDialog" >QPrintDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractPrintDialog a r =&gt; QqCastList_QAbstractPrintDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPrintDialog" >QAbstractPrintDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextEdit a r =&gt; QqCastList_QTextEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBrowser" >QTextBrowser</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextEdit a r =&gt; QqCastList_QTextEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextEdit" >QTextEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTableView a r =&gt; QqCastList_QTableView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTableView a r =&gt; QqCastList_QTableView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableView" >QTableView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTreeView a r =&gt; QqCastList_QTreeView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTreeView a r =&gt; QqCastList_QTreeView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeView" >QTreeView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIconEngine a r =&gt; QqCastList_QIconEngine (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIconEngineV2" >QIconEngineV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QIconEngine a r =&gt; QqCastList_QIconEngine (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIconEngine" >QIconEngine</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionViewItem a r =&gt; QqCastList_QStyleOptionViewItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV3" >QStyleOptionViewItemV3</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionViewItem a r =&gt; QqCastList_QStyleOptionViewItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV2" >QStyleOptionViewItemV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionViewItem a r =&gt; QqCastList_QStyleOptionViewItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItem" >QStyleOptionViewItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyle a r =&gt; QqCastList_QStyle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWindowsStyle" >QWindowsStyle</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyle a r =&gt; QqCastList_QStyle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCommonStyle" >QCommonStyle</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyle a r =&gt; QqCastList_QStyle (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyle" >QStyle</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QBoxLayout a r =&gt; QqCastList_QBoxLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHBoxLayout" >QHBoxLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QBoxLayout a r =&gt; QqCastList_QBoxLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQVBoxLayout" >QVBoxLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QBoxLayout a r =&gt; QqCastList_QBoxLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBoxLayout" >QBoxLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDropEvent a r =&gt; QqCastList_QDropEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragEnterEvent" >QDragEnterEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDropEvent a r =&gt; QqCastList_QDropEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDragMoveEvent" >QDragMoveEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDropEvent a r =&gt; QqCastList_QDropEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDropEvent" >QDropEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDateTimeEdit a r =&gt; QqCastList_QDateTimeEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateEdit" >QDateEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDateTimeEdit a r =&gt; QqCastList_QDateTimeEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTimeEdit" >QTimeEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDateTimeEdit a r =&gt; QqCastList_QDateTimeEdit (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateTimeEdit" >QDateTimeEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QListView a r =&gt; QqCastList_QListView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QListView a r =&gt; QqCastList_QListView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QListView a r =&gt; QqCastList_QListView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QMimeSource a r =&gt; QqCastList_QMimeSource (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMimeSource" >QMimeSource</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSlider a r =&gt; QqCastList_QAbstractSlider (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollBar" >QScrollBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSlider a r =&gt; QqCastList_QAbstractSlider (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDial" >QDial</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSlider a r =&gt; QqCastList_QAbstractSlider (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSlider" >QSlider</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSlider a r =&gt; QqCastList_QAbstractSlider (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSlider" >QAbstractSlider</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QValidator a r =&gt; QqCastList_QValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDoubleValidator" >QDoubleValidator</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QValidator a r =&gt; QqCastList_QValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQIntValidator" >QIntValidator</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QValidator a r =&gt; QqCastList_QValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRegExpValidator" >QRegExpValidator</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QValidator a r =&gt; QqCastList_QValidator (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQValidator" >QValidator</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGradient a r =&gt; QqCastList_QGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRadialGradient" >QRadialGradient</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGradient a r =&gt; QqCastList_QGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQConicalGradient" >QConicalGradient</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGradient a r =&gt; QqCastList_QGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLinearGradient" >QLinearGradient</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGradient a r =&gt; QqCastList_QGradient (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGradient" >QGradient</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractButton a r =&gt; QqCastList_QAbstractButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolButton" >QToolButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractButton a r =&gt; QqCastList_QAbstractButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCheckBox" >QCheckBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractButton a r =&gt; QqCastList_QAbstractButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRadioButton" >QRadioButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractButton a r =&gt; QqCastList_QAbstractButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPushButton" >QPushButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractButton a r =&gt; QqCastList_QAbstractButton (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractButton" >QAbstractButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextObject a r =&gt; QqCastList_QTextObject (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTable" >QTextTable</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextObject a r =&gt; QqCastList_QTextObject (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextList" >QTextList</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextObject a r =&gt; QqCastList_QTextObject (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrame" >QTextFrame</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextObject a r =&gt; QqCastList_QTextObject (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockGroup" >QTextBlockGroup</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextObject a r =&gt; QqCastList_QTextObject (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextObject" >QTextObject</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputEvent a r =&gt; QqCastList_QInputEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQContextMenuEvent" >QContextMenuEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputEvent a r =&gt; QqCastList_QInputEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabletEvent" >QTabletEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputEvent a r =&gt; QqCastList_QInputEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWheelEvent" >QWheelEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputEvent a r =&gt; QqCastList_QInputEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQKeyEvent" >QKeyEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputEvent a r =&gt; QqCastList_QInputEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMouseEvent" >QMouseEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QInputEvent a r =&gt; QqCastList_QInputEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQInputEvent" >QInputEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSpinBox a r =&gt; QqCastList_QAbstractSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateEdit" >QDateEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSpinBox a r =&gt; QqCastList_QAbstractSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTimeEdit" >QTimeEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSpinBox a r =&gt; QqCastList_QAbstractSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSpinBox" >QSpinBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSpinBox a r =&gt; QqCastList_QAbstractSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDoubleSpinBox" >QDoubleSpinBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSpinBox a r =&gt; QqCastList_QAbstractSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateTimeEdit" >QDateTimeEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractSpinBox a r =&gt; QqCastList_QAbstractSpinBox (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSpinBox" >QAbstractSpinBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayout a r =&gt; QqCastList_QLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStackedLayout" >QStackedLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayout a r =&gt; QqCastList_QLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGridLayout" >QGridLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayout a r =&gt; QqCastList_QLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHBoxLayout" >QHBoxLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayout a r =&gt; QqCastList_QLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQVBoxLayout" >QVBoxLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayout a r =&gt; QqCastList_QLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBoxLayout" >QBoxLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayout a r =&gt; QqCastList_QLayout (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLayout" >QLayout</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractGraphicsShapeItem a r =&gt; QqCastList_QAbstractGraphicsShapeItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPolygonItem" >QGraphicsPolygonItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractGraphicsShapeItem a r =&gt; QqCastList_QAbstractGraphicsShapeItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPathItem" >QGraphicsPathItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractGraphicsShapeItem a r =&gt; QqCastList_QAbstractGraphicsShapeItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsRectItem" >QGraphicsRectItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractGraphicsShapeItem a r =&gt; QqCastList_QAbstractGraphicsShapeItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSimpleTextItem" >QGraphicsSimpleTextItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractGraphicsShapeItem a r =&gt; QqCastList_QAbstractGraphicsShapeItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsEllipseItem" >QGraphicsEllipseItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractGraphicsShapeItem a r =&gt; QqCastList_QAbstractGraphicsShapeItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractGraphicsShapeItem" >QAbstractGraphicsShapeItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent a r =&gt; QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneWheelEvent" >QGraphicsSceneWheelEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent a r =&gt; QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneDragDropEvent" >QGraphicsSceneDragDropEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent a r =&gt; QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneMouseEvent" >QGraphicsSceneMouseEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent a r =&gt; QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneContextMenuEvent" >QGraphicsSceneContextMenuEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent a r =&gt; QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneHoverEvent" >QGraphicsSceneHoverEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent a r =&gt; QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneHelpEvent" >QGraphicsSceneHelpEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsSceneEvent a r =&gt; QqCastList_QGraphicsSceneEvent (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSceneEvent" >QGraphicsSceneEvent</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat a r =&gt; QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextTableFormat" >QTextTableFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat a r =&gt; QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextListFormat" >QTextListFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat a r =&gt; QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBlockFormat" >QTextBlockFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat a r =&gt; QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextImageFormat" >QTextImageFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat a r =&gt; QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextCharFormat" >QTextCharFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat a r =&gt; QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFrameFormat" >QTextFrameFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QTextFormat a r =&gt; QqCastList_QTextFormat (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextFormat" >QTextFormat</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayoutItem a r =&gt; QqCastList_QLayoutItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSpacerItem" >QSpacerItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QLayoutItem a r =&gt; QqCastList_QLayoutItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLayoutItem" >QLayoutItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex a r =&gt; QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSizeGrip" >QStyleOptionSizeGrip</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex a r =&gt; QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComboBox" >QStyleOptionComboBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex a r =&gt; QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSpinBox" >QStyleOptionSpinBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex a r =&gt; QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionGroupBox" >QStyleOptionGroupBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex a r =&gt; QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTitleBar" >QStyleOptionTitleBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex a r =&gt; QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSlider" >QStyleOptionSlider</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex a r =&gt; QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolButton" >QStyleOptionToolButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOptionComplex a r =&gt; QqCastList_QStyleOptionComplex (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComplex" >QStyleOptionComplex</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView a r =&gt; QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView a r =&gt; QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView a r =&gt; QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView a r =&gt; QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView a r =&gt; QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHeaderView" >QHeaderView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView a r =&gt; QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableView" >QTableView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView a r =&gt; QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeView" >QTreeView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView a r =&gt; QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractItemView a r =&gt; QqCastList_QAbstractItemView (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog a r =&gt; QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQProgressDialog" >QProgressDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog a r =&gt; QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontDialog" >QFontDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog a r =&gt; QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFileDialog" >QFileDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog a r =&gt; QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQErrorMessage" >QErrorMessage</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog a r =&gt; QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMessageBox" >QMessageBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog a r =&gt; QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPageSetupDialog" >QAbstractPageSetupDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog a r =&gt; QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColorDialog" >QColorDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog a r =&gt; QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrintDialog" >QPrintDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog a r =&gt; QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPrintDialog" >QAbstractPrintDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QDialog a r =&gt; QqCastList_QDialog (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem a r =&gt; QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItemGroup" >QGraphicsItemGroup</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem a r =&gt; QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPixmapItem" >QGraphicsPixmapItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem a r =&gt; QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsLineItem" >QGraphicsLineItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem a r =&gt; QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPolygonItem" >QGraphicsPolygonItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem a r =&gt; QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsPathItem" >QGraphicsPathItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem a r =&gt; QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsRectItem" >QGraphicsRectItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem a r =&gt; QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsSimpleTextItem" >QGraphicsSimpleTextItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem a r =&gt; QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsEllipseItem" >QGraphicsEllipseItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem a r =&gt; QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractGraphicsShapeItem" >QAbstractGraphicsShapeItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QGraphicsItem a r =&gt; QqCastList_QGraphicsItem (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsItem" >QGraphicsItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBrowser" >QTextBrowser</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollArea" >QScrollArea</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsView" >QGraphicsView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHeaderView" >QHeaderView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextEdit" >QTextEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableView" >QTableView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeView" >QTreeView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QAbstractScrollArea a r =&gt; QqCastList_QAbstractScrollArea (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBrowser" >QTextBrowser</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplitter" >QSplitter</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStackedWidget" >QStackedWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLCDNumber" >QLCDNumber</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBox" >QToolBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLabel" >QLabel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollArea" >QScrollArea</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsView" >QGraphicsView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHeaderView" >QHeaderView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextEdit" >QTextEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableView" >QTableView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeView" >QTreeView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QFrame a r =&gt; QqCastList_QFrame (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV3" >QStyleOptionViewItemV3</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBoxV2" >QStyleOptionToolBoxV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabV2" >QStyleOptionTabV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBarV2" >QStyleOptionProgressBarV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrameV2" >QStyleOptionFrameV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidgetV2" >QStyleOptionDockWidgetV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSizeGrip" >QStyleOptionSizeGrip</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComboBox" >QStyleOptionComboBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSpinBox" >QStyleOptionSpinBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionGroupBox" >QStyleOptionGroupBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTitleBar" >QStyleOptionTitleBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionSlider" >QStyleOptionSlider</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolButton" >QStyleOptionToolButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionButton" >QStyleOptionButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionMenuItem" >QStyleOptionMenuItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabWidgetFrame" >QStyleOptionTabWidgetFrame</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFocusRect" >QStyleOptionFocusRect</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTabBarBase" >QStyleOptionTabBarBase</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionHeader" >QStyleOptionHeader</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBar" >QStyleOptionToolBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionGraphicsItem" >QStyleOptionGraphicsItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionRubberBand" >QStyleOptionRubberBand</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItemV2" >QStyleOptionViewItemV2</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionToolBox" >QStyleOptionToolBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionTab" >QStyleOptionTab</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionFrame" >QStyleOptionFrame</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionDockWidget" >QStyleOptionDockWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionProgressBar" >QStyleOptionProgressBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionViewItem" >QStyleOptionViewItem</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOptionComplex" >QStyleOptionComplex</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QStyleOption a r =&gt; QqCastList_QStyleOption (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStyleOption" >QStyleOption</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBar" >QToolBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGroupBox" >QGroupBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabBar" >QTabBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStatusBar" >QStatusBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSizeGrip" >QSizeGrip</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDockWidget" >QDockWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMenuBar" >QMenuBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRubberBand" >QRubberBand</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialogButtonBox" >QDialogButtonBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQProgressBar" >QProgressBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTabWidget" >QTabWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplashScreen" >QSplashScreen</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFocusFrame" >QFocusFrame</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMainWindow" >QMainWindow</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplitterHandle" >QSplitterHandle</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDesktopWidget" >QDesktopWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLineEdit" >QLineEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCalendarWidget" >QCalendarWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMenu" >QMenu</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeWidget" >QTreeWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextBrowser" >QTextBrowser</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableWidget" >QTableWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQUndoView" >QUndoView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListWidget" >QListWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSplitter" >QSplitter</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQStackedWidget" >QStackedWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLCDNumber" >QLCDNumber</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolBox" >QToolBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQLabel" >QLabel</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQProgressDialog" >QProgressDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontDialog" >QFontDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFileDialog" >QFileDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQErrorMessage" >QErrorMessage</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQMessageBox" >QMessageBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPageSetupDialog" >QAbstractPageSetupDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQColorDialog" >QColorDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateEdit" >QDateEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTimeEdit" >QTimeEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFontComboBox" >QFontComboBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSpinBox" >QSpinBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDoubleSpinBox" >QDoubleSpinBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollBar" >QScrollBar</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDial" >QDial</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQSlider" >QSlider</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQScrollArea" >QScrollArea</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQGraphicsView" >QGraphicsView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrintDialog" >QPrintDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQHeaderView" >QHeaderView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQToolButton" >QToolButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQCheckBox" >QCheckBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQRadioButton" >QRadioButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPushButton" >QPushButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQComboBox" >QComboBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractPrintDialog" >QAbstractPrintDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTextEdit" >QTextEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTableView" >QTableView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQTreeView" >QTreeView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDateTimeEdit" >QDateTimeEdit</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQListView" >QListView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSlider" >QAbstractSlider</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractButton" >QAbstractButton</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractSpinBox" >QAbstractSpinBox</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractItemView" >QAbstractItemView</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQDialog" >QDialog</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQAbstractScrollArea" >QAbstractScrollArea</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQFrame" >QFrame</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QWidget a r =&gt; QqCastList_QWidget (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQWidget" >QWidget</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintDevice a r =&gt; QqCastList_QPaintDevice (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQBitmap" >QBitmap</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintDevice a r =&gt; QqCastList_QPaintDevice (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQImage" >QImage</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintDevice a r =&gt; QqCastList_QPaintDevice (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPrinter" >QPrinter</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintDevice a r =&gt; QqCastList_QPaintDevice (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPicture" >QPicture</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintDevice a r =&gt; QqCastList_QPaintDevice (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPixmap" >QPixmap</A > ()) (a -&gt; r)</TD ></TR ><TR ><TD CLASS="decl" >QqCastList_QPaintDevice a r =&gt; QqCastList_QPaintDevice (<A HREF="Qtc-ClassTypes-Gui.html#t%3AQPaintDevice" >QPaintDevice</A > ()) (a -&gt; r)</TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:objectNull" ><A NAME="v%3AobjectNull" ></A ></A ><B >objectNull</B > :: <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:objectIsNull" ><A NAME="v%3AobjectIsNull" ></A ></A ><B >objectIsNull</B > :: <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a -&gt; Bool</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:objectCast" ><A NAME="v%3AobjectCast" ></A ></A ><B >objectCast</B > :: <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a -&gt; <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > b</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:objectFromPtr" ><A NAME="v%3AobjectFromPtr" ></A ></A ><B >objectFromPtr</B > :: FunPtr (Ptr a -&gt; IO ()) -&gt; Ptr a -&gt; IO (<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:objectFromPtr_nf" ><A NAME="v%3AobjectFromPtr_nf" ></A ></A ><B >objectFromPtr_nf</B > :: Ptr a -&gt; IO (<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withObjectPtr" ><A NAME="v%3AwithObjectPtr" ></A ></A ><B >withObjectPtr</B > :: <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a -&gt; (Ptr a -&gt; IO b) -&gt; IO b</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:ptrFromObject" ><A NAME="v%3AptrFromObject" ></A ></A ><B >ptrFromObject</B > :: <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a -&gt; Ptr a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:objectListFromPtrList" ><A NAME="v%3AobjectListFromPtrList" ></A ></A ><B >objectListFromPtrList</B > :: FunPtr (Ptr a -&gt; IO ()) -&gt; [Ptr a] -&gt; IO [<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a]</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:objectListFromPtrList_nf" ><A NAME="v%3AobjectListFromPtrList_nf" ></A ></A ><B >objectListFromPtrList_nf</B > :: [Ptr a] -&gt; IO [<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a]</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:QVoid" ><A NAME="t%3AQVoid" ></A ></A ><B >QVoid</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACQVoid" >CQVoid</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TQVoid" ><A NAME="t%3ATQVoid" ></A ></A ><B >TQVoid</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACQVoid" >CQVoid</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CQVoid" ><A NAME="t%3ACQVoid" ></A ></A ><B >CQVoid</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQVoidResult" ><A NAME="v%3AwithQVoidResult" ></A ></A ><B >withQVoidResult</B > :: IO (Ptr (<A HREF="Qtc-Classes-Types.html#t%3ATQVoid" >TQVoid</A > a)) -&gt; IO (<A HREF="Qtc-Classes-Types.html#t%3AQVoid" >QVoid</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:QMetaObject" ><A NAME="t%3AQMetaObject" ></A ></A ><B >QMetaObject</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACQMetaObject" >CQMetaObject</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TQMetaObject" ><A NAME="t%3ATQMetaObject" ></A ></A ><B >TQMetaObject</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACQMetaObject" >CQMetaObject</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CQMetaObject" ><A NAME="t%3ACQMetaObject" ></A ></A ><B >CQMetaObject</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQMetaObjectResult" ><A NAME="v%3AwithQMetaObjectResult" ></A ></A ><B >withQMetaObjectResult</B > :: IO (Ptr (<A HREF="Qtc-Classes-Types.html#t%3ATQMetaObject" >TQMetaObject</A > a)) -&gt; IO (<A HREF="Qtc-Classes-Types.html#t%3AQMetaObject" >QMetaObject</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:QString" ><A NAME="t%3AQString" ></A ></A ><B >QString</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACQString" >CQString</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TQString" ><A NAME="t%3ATQString" ></A ></A ><B >TQString</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACQString" >CQString</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CQString" ><A NAME="t%3ACQString" ></A ></A ><B >CQString</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:QByteArray" ><A NAME="t%3AQByteArray" ></A ></A ><B >QByteArray</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACQByteArray" >CQByteArray</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TQByteArray" ><A NAME="t%3ATQByteArray" ></A ></A ><B >TQByteArray</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACQByteArray" >CQByteArray</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CQByteArray" ><A NAME="t%3ACQByteArray" ></A ></A ><B >CQByteArray</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:QResource" ><A NAME="t%3AQResource" ></A ></A ><B >QResource</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACQResource" >CQResource</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TQResource" ><A NAME="t%3ATQResource" ></A ></A ><B >TQResource</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACQResource" >CQResource</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CQResource" ><A NAME="t%3ACQResource" ></A ></A ><B >CQResource</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQResourceResult" ><A NAME="v%3AwithQResourceResult" ></A ></A ><B >withQResourceResult</B > :: IO (Ptr (<A HREF="Qtc-Classes-Types.html#t%3ATQResource" >TQResource</A > a)) -&gt; IO (<A HREF="Qtc-Classes-Types.html#t%3AQResource" >QResource</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:QTransform" ><A NAME="t%3AQTransform" ></A ></A ><B >QTransform</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACQTransform" >CQTransform</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TQTransform" ><A NAME="t%3ATQTransform" ></A ></A ><B >TQTransform</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACQTransform" >CQTransform</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CQTransform" ><A NAME="t%3ACQTransform" ></A ></A ><B >CQTransform</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQTransformResult" ><A NAME="v%3AwithQTransformResult" ></A ></A ><B >withQTransformResult</B > :: IO (Ptr (<A HREF="Qtc-Classes-Types.html#t%3ATQTransform" >TQTransform</A > a)) -&gt; IO (<A HREF="Qtc-Classes-Types.html#t%3AQTransform" >QTransform</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:Element" ><A NAME="t%3AElement" ></A ></A ><B >Element</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACElement" >CElement</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TElement" ><A NAME="t%3ATElement" ></A ></A ><B >TElement</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACElement" >CElement</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CElement" ><A NAME="t%3ACElement" ></A ></A ><B >CElement</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withElementResult" ><A NAME="v%3AwithElementResult" ></A ></A ><B >withElementResult</B > :: IO (Ptr (<A HREF="Qtc-Classes-Types.html#t%3ATElement" >TElement</A > a)) -&gt; IO (<A HREF="Qtc-Classes-Types.html#t%3AElement" >Element</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:PaintContext" ><A NAME="t%3APaintContext" ></A ></A ><B >PaintContext</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACPaintContext" >CPaintContext</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TPaintContext" ><A NAME="t%3ATPaintContext" ></A ></A ><B >TPaintContext</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACPaintContext" >CPaintContext</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CPaintContext" ><A NAME="t%3ACPaintContext" ></A ></A ><B >CPaintContext</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withPaintContextResult" ><A NAME="v%3AwithPaintContextResult" ></A ></A ><B >withPaintContextResult</B > :: IO (Ptr (<A HREF="Qtc-Classes-Types.html#t%3ATPaintContext" >TPaintContext</A > a)) -&gt; IO (<A HREF="Qtc-Classes-Types.html#t%3APaintContext" >PaintContext</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:ExtraSelection" ><A NAME="t%3AExtraSelection" ></A ></A ><B >ExtraSelection</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACExtraSelection" >CExtraSelection</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TExtraSelection" ><A NAME="t%3ATExtraSelection" ></A ></A ><B >TExtraSelection</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACExtraSelection" >CExtraSelection</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CExtraSelection" ><A NAME="t%3ACExtraSelection" ></A ></A ><B >CExtraSelection</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:QTextInlineObject" ><A NAME="t%3AQTextInlineObject" ></A ></A ><B >QTextInlineObject</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACQTextInlineObject" >CQTextInlineObject</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TQTextInlineObject" ><A NAME="t%3ATQTextInlineObject" ></A ></A ><B >TQTextInlineObject</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACQTextInlineObject" >CQTextInlineObject</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CQTextInlineObject" ><A NAME="t%3ACQTextInlineObject" ></A ></A ><B >CQTextInlineObject</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:QTextObjectInterface" ><A NAME="t%3AQTextObjectInterface" ></A ></A ><B >QTextObjectInterface</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACQTextObjectInterface" >CQTextObjectInterface</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TQTextObjectInterface" ><A NAME="t%3ATQTextObjectInterface" ></A ></A ><B >TQTextObjectInterface</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACQTextObjectInterface" >CQTextObjectInterface</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CQTextObjectInterface" ><A NAME="t%3ACQTextObjectInterface" ></A ></A ><B >CQTextObjectInterface</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:QImageTextKeyLang" ><A NAME="t%3AQImageTextKeyLang" ></A ></A ><B >QImageTextKeyLang</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACQImageTextKeyLang" >CQImageTextKeyLang</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TQImageTextKeyLang" ><A NAME="t%3ATQImageTextKeyLang" ></A ></A ><B >TQImageTextKeyLang</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACQImageTextKeyLang" >CQImageTextKeyLang</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CQImageTextKeyLang" ><A NAME="t%3ACQImageTextKeyLang" ></A ></A ><B >CQImageTextKeyLang</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:Q_IPV6ADDR" ><A NAME="t%3AQ_IPV6ADDR" ></A ></A ><B >Q_IPV6ADDR</B > a = <A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > (<A HREF="Qtc-Classes-Types.html#t%3ACQ_IPV6ADDR" >CQ_IPV6ADDR</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TQ_IPV6ADDR" ><A NAME="t%3ATQ_IPV6ADDR" ></A ></A ><B >TQ_IPV6ADDR</B > a = <A HREF="Qtc-Classes-Types.html#t%3ACQ_IPV6ADDR" >CQ_IPV6ADDR</A > a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:CQ_IPV6ADDR" ><A NAME="t%3ACQ_IPV6ADDR" ></A ></A ><B >CQ_IPV6ADDR</B > a </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQ_IPV6ADDRResult" ><A NAME="v%3AwithQ_IPV6ADDRResult" ></A ></A ><B >withQ_IPV6ADDRResult</B > :: IO (Ptr (<A HREF="Qtc-Classes-Types.html#t%3ATQ_IPV6ADDR" >TQ_IPV6ADDR</A > a)) -&gt; IO (<A HREF="Qtc-Classes-Types.html#t%3AQ_IPV6ADDR" >Q_IPV6ADDR</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withObjectResult" ><A NAME="v%3AwithObjectResult" ></A ></A ><B >withObjectResult</B > :: FunPtr (Ptr a -&gt; IO ()) -&gt; IO (Ptr a) -&gt; IO (<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withObjectRefResult" ><A NAME="v%3AwithObjectRefResult" ></A ></A ><B >withObjectRefResult</B > :: IO (Ptr a) -&gt; IO (<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:intFromBool" ><A NAME="v%3AintFromBool" ></A ></A ><B >intFromBool</B > :: Bool -&gt; Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:boolFromInt" ><A NAME="v%3AboolFromInt" ></A ></A ><B >boolFromInt</B > :: Int -&gt; Bool</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQListObject" ><A NAME="v%3AwithQListObject" ></A ></A ><B >withQListObject</B > :: [<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a] -&gt; (CInt -&gt; Ptr (Ptr a) -&gt; IO b) -&gt; IO b</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withPtrPtrObject" ><A NAME="v%3AwithPtrPtrObject" ></A ></A ><B >withPtrPtrObject</B > :: [<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > ()] -&gt; (CInt -&gt; Ptr (Ptr ()) -&gt; IO a) -&gt; IO a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQListString" ><A NAME="v%3AwithQListString" ></A ></A ><B >withQListString</B > :: [String] -&gt; (CInt -&gt; Ptr CWString -&gt; IO a) -&gt; IO a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQListObjectResult" ><A NAME="v%3AwithQListObjectResult" ></A ></A ><B >withQListObjectResult</B > :: FunPtr (Ptr a -&gt; IO ()) -&gt; (Ptr (Ptr a) -&gt; IO CInt) -&gt; IO [<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a]</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQListObjectRefResult" ><A NAME="v%3AwithQListObjectRefResult" ></A ></A ><B >withQListObjectRefResult</B > :: (Ptr (Ptr a) -&gt; IO CInt) -&gt; IO [<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > a]</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withPtrPtrObjectResult" ><A NAME="v%3AwithPtrPtrObjectResult" ></A ></A ><B >withPtrPtrObjectResult</B > :: (Ptr (Ptr ()) -&gt; IO CInt) -&gt; IO [<A HREF="Qtc-Classes-Types.html#t%3AObject" >Object</A > ()]</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQListStringResult" ><A NAME="v%3AwithQListStringResult" ></A ></A ><B >withQListStringResult</B > :: (Ptr (Ptr (<A HREF="Qtc-Classes-Types.html#t%3ATQString" >TQString</A > a)) -&gt; IO CInt) -&gt; IO [String]</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQListDouble" ><A NAME="v%3AwithQListDouble" ></A ></A ><B >withQListDouble</B > :: [Double] -&gt; (CInt -&gt; Ptr CDouble -&gt; IO b) -&gt; IO b</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQListDoubleResult" ><A NAME="v%3AwithQListDoubleResult" ></A ></A ><B >withQListDoubleResult</B > :: (Ptr CDouble -&gt; IO CInt) -&gt; IO [Double]</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQListIntResult" ><A NAME="v%3AwithQListIntResult" ></A ></A ><B >withQListIntResult</B > :: (Ptr CInt -&gt; IO CInt) -&gt; IO [Int]</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withQListLongResult" ><A NAME="v%3AwithQListLongResult" ></A ></A ><B >withQListLongResult</B > :: (Ptr CLong -&gt; IO CInt) -&gt; IO [Int]</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CString</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >withCString</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withStringResult" ><A NAME="v%3AwithStringResult" ></A ></A ><B >withStringResult</B > :: IO (Ptr (<A HREF="Qtc-Classes-Types.html#t%3ATQString" >TQString</A > a)) -&gt; IO String</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withCStringResult" ><A NAME="v%3AwithCStringResult" ></A ></A ><B >withCStringResult</B > :: IO (Ptr (<A HREF="Qtc-Classes-Types.html#t%3ATQByteArray" >TQByteArray</A > a)) -&gt; IO String</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:stringFromPtr" ><A NAME="v%3AstringFromPtr" ></A ></A ><B >stringFromPtr</B > :: Ptr (<A HREF="Qtc-Classes-Types.html#t%3ATQString" >TQString</A > a) -&gt; IO String</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:cstringFromPtr" ><A NAME="v%3AcstringFromPtr" ></A ></A ><B >cstringFromPtr</B > :: Ptr (<A HREF="Qtc-Classes-Types.html#t%3ATQByteArray" >TQByteArray</A > a) -&gt; IO String</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >newCWString</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CWString</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >withCWString</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CDouble</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCDouble" ><A NAME="v%3AtoCDouble" ></A ></A ><B >toCDouble</B > :: Double -&gt; CDouble</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fromCDouble" ><A NAME="v%3AfromCDouble" ></A ></A ><B >fromCDouble</B > :: CDouble -&gt; Double</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withDoubleResult" ><A NAME="v%3AwithDoubleResult" ></A ></A ><B >withDoubleResult</B > :: IO CDouble -&gt; IO Double</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CInt</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCInt" ><A NAME="v%3AtoCInt" ></A ></A ><B >toCInt</B > :: Int -&gt; CInt</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fromCInt" ><A NAME="v%3AfromCInt" ></A ></A ><B >fromCInt</B > :: CInt -&gt; Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withIntResult" ><A NAME="v%3AwithIntResult" ></A ></A ><B >withIntResult</B > :: IO CInt -&gt; IO Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CUInt</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCUInt" ><A NAME="v%3AtoCUInt" ></A ></A ><B >toCUInt</B > :: Int -&gt; CUInt</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fromCUInt" ><A NAME="v%3AfromCUInt" ></A ></A ><B >fromCUInt</B > :: CUInt -&gt; Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withUnsignedIntResult" ><A NAME="v%3AwithUnsignedIntResult" ></A ></A ><B >withUnsignedIntResult</B > :: IO CUInt -&gt; IO Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CShort</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCShort" ><A NAME="v%3AtoCShort" ></A ></A ><B >toCShort</B > :: Int -&gt; CShort</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fromCShort" ><A NAME="v%3AfromCShort" ></A ></A ><B >fromCShort</B > :: CShort -&gt; Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withShortResult" ><A NAME="v%3AwithShortResult" ></A ></A ><B >withShortResult</B > :: IO CShort -&gt; IO Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CUShort</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCUShort" ><A NAME="v%3AtoCUShort" ></A ></A ><B >toCUShort</B > :: Int -&gt; CUShort</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fromCUShort" ><A NAME="v%3AfromCUShort" ></A ></A ><B >fromCUShort</B > :: CUShort -&gt; Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withUnsignedShortResult" ><A NAME="v%3AwithUnsignedShortResult" ></A ></A ><B >withUnsignedShortResult</B > :: IO CUShort -&gt; IO Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CLong</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCLong" ><A NAME="v%3AtoCLong" ></A ></A ><B >toCLong</B > :: Int -&gt; CLong</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fromCLong" ><A NAME="v%3AfromCLong" ></A ></A ><B >fromCLong</B > :: CLong -&gt; Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withLongResult" ><A NAME="v%3AwithLongResult" ></A ></A ><B >withLongResult</B > :: IO CLong -&gt; IO Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CULong</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCULong" ><A NAME="v%3AtoCULong" ></A ></A ><B >toCULong</B > :: Int -&gt; CULong</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fromCULong" ><A NAME="v%3AfromCULong" ></A ></A ><B >fromCULong</B > :: CULong -&gt; Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withUnsignedLongResult" ><A NAME="v%3AwithUnsignedLongResult" ></A ></A ><B >withUnsignedLongResult</B > :: IO CULong -&gt; IO Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CLLong</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCLLong" ><A NAME="v%3AtoCLLong" ></A ></A ><B >toCLLong</B > :: Int -&gt; CLLong</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fromCLLong" ><A NAME="v%3AfromCLLong" ></A ></A ><B >fromCLLong</B > :: CLLong -&gt; Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withLongLongResult" ><A NAME="v%3AwithLongLongResult" ></A ></A ><B >withLongLongResult</B > :: IO CLLong -&gt; IO Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CULLong</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCULLong" ><A NAME="v%3AtoCULLong" ></A ></A ><B >toCULLong</B > :: Int -&gt; CULLong</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fromCULLong" ><A NAME="v%3AfromCULLong" ></A ></A ><B >fromCULLong</B > :: CULLong -&gt; Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withUnsignedLongLongResult" ><A NAME="v%3AwithUnsignedLongLongResult" ></A ></A ><B >withUnsignedLongLongResult</B > :: IO CULLong -&gt; IO Int</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CChar</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCChar" ><A NAME="v%3AtoCChar" ></A ></A ><B >toCChar</B > :: Char -&gt; CChar</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fromCChar" ><A NAME="v%3AfromCChar" ></A ></A ><B >fromCChar</B > :: CChar -&gt; Char</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withCharResult" ><A NAME="v%3AwithCharResult" ></A ></A ><B >withCharResult</B > :: (Num a, Integral a) =&gt; IO a -&gt; IO Char</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >CWchar</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCWchar" ><A NAME="v%3AtoCWchar" ></A ></A ><B >toCWchar</B > :: Num a =&gt; Char -&gt; a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:CBool" ><A NAME="t%3ACBool" ></A ></A ><B >CBool</B > = CInt</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCBool" ><A NAME="v%3AtoCBool" ></A ></A ><B >toCBool</B > :: Bool -&gt; <A HREF="Qtc-Classes-Types.html#t%3ACBool" >CBool</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fromCBool" ><A NAME="v%3AfromCBool" ></A ></A ><B >fromCBool</B > :: <A HREF="Qtc-Classes-Types.html#t%3ACBool" >CBool</A > -&gt; Bool</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:withBoolResult" ><A NAME="v%3AwithBoolResult" ></A ></A ><B >withBoolResult</B > :: IO <A HREF="Qtc-Classes-Types.html#t%3ACBool" >CBool</A > -&gt; IO Bool</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >Ptr</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >nullPtr</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:ptrNull" ><A NAME="v%3AptrNull" ></A ></A ><B >ptrNull</B > :: Ptr a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:ptrIsNull" ><A NAME="v%3AptrIsNull" ></A ></A ><B >ptrIsNull</B > :: Ptr a -&gt; Bool</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:ptrCast" ><A NAME="v%3AptrCast" ></A ></A ><B >ptrCast</B > :: Ptr a -&gt; Ptr b</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >ForeignPtr</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fptrNull" ><A NAME="v%3AfptrNull" ></A ></A ><B >fptrNull</B > :: IO (ForeignPtr a)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fptrIsNull" ><A NAME="v%3AfptrIsNull" ></A ></A ><B >fptrIsNull</B > :: ForeignPtr a -&gt; Bool</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:fptrCast" ><A NAME="v%3AfptrCast" ></A ></A ><B >fptrCast</B > :: ForeignPtr a -&gt; ForeignPtr b</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >FunPtr</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toCFunPtr" ><A NAME="v%3AtoCFunPtr" ></A ></A ><B >toCFunPtr</B > :: FunPtr a -&gt; Ptr a</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >freeHaskellFunPtr</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >castPtrToFunPtr</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" >addForeignPtrFinalizer</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="botbar" >Produced by <A HREF="http://www.haskell.org/haddock/" >Haddock</A > version 2.4.2</TD ></TR ></TABLE ></BODY ></HTML >
Java
using System; using System.Collections.Generic; namespace NMaier.SimpleDlna.Utilities { public abstract class Repository<TInterface> where TInterface : class, IRepositoryItem { private static readonly Dictionary<string, TInterface> items = BuildRepository(); private static Dictionary<string, TInterface> BuildRepository() { var items = new Dictionary<string, TInterface>(); var type = typeof(TInterface).Name; var a = typeof(TInterface).Assembly; foreach (Type t in a.GetTypes()) { if (t.GetInterface(type) == null) { continue; } var ctor = t.GetConstructor(new Type[] { }); if (ctor == null) { continue; } try { var item = ctor.Invoke(new object[] { }) as TInterface; if (item == null) { continue; } items.Add(item.Name.ToUpperInvariant(), item); } catch (Exception) { continue; } } return items; } public static IDictionary<string, IRepositoryItem> ListItems() { var rv = new Dictionary<string, IRepositoryItem>(); foreach (var v in items.Values) { rv.Add(v.Name, v); } return rv; } public static TInterface Lookup(string name) { if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentException( "Invalid repository name", "name"); } var n_p = name.Split(new char[] { ':' }, 2); name = n_p[0].ToUpperInvariant().Trim(); var result = (TInterface)null; if (!items.TryGetValue(name, out result)) { throw new RepositoryLookupException(name); } if (n_p.Length == 1) { return result; } var ctor = result.GetType().GetConstructor(new Type[] { }); if (ctor == null) { throw new RepositoryLookupException(name); } var parameters = new AttributeCollection(); foreach (var p in n_p[1].Split(',')) { var k_v = p.Split(new char[] { '=' }, 2); if (k_v.Length == 2) { parameters.Add(k_v[0], k_v[1]); } else { parameters.Add(k_v[0], null); } } try { var item = ctor.Invoke(new object[] { }) as TInterface; if (item == null) { throw new RepositoryLookupException(name); } item.SetParameters(parameters); return item; } catch (Exception ex) { throw new RepositoryLookupException(string.Format( "Cannot construct repository item: {0}", ex.Message), ex); } } } }
Java
// Package tag. package tag println("tag27")
Java
namespace XenAdmin.Dialogs { partial class AboutDialog { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutDialog)); this.label2 = new System.Windows.Forms.Label(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.VersionLabel = new System.Windows.Forms.Label(); this.OkButton = new System.Windows.Forms.Button(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // label2 // resources.ApplyResources(this.label2, "label2"); this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Name = "label2"; // // pictureBox1 // resources.ApplyResources(this.pictureBox1, "pictureBox1"); this.pictureBox1.Image = global::XenAdmin.Properties.Resources.about_box_graphic_423x79; this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.TabStop = false; // // VersionLabel // resources.ApplyResources(this.VersionLabel, "VersionLabel"); this.VersionLabel.BackColor = System.Drawing.Color.Transparent; this.VersionLabel.Name = "VersionLabel"; // // OkButton // resources.ApplyResources(this.OkButton, "OkButton"); this.OkButton.BackColor = System.Drawing.SystemColors.Control; this.OkButton.DialogResult = System.Windows.Forms.DialogResult.OK; this.OkButton.Name = "OkButton"; this.OkButton.UseVisualStyleBackColor = true; this.OkButton.Click += new System.EventHandler(this.OkButton_Click); // // linkLabel1 // resources.ApplyResources(this.linkLabel1, "linkLabel1"); this.linkLabel1.Name = "linkLabel1"; this.linkLabel1.TabStop = true; this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); // // tableLayoutPanel1 // resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1"); this.tableLayoutPanel1.Controls.Add(this.VersionLabel, 0, 0); this.tableLayoutPanel1.Controls.Add(this.OkButton, 0, 4); this.tableLayoutPanel1.Controls.Add(this.linkLabel1, 0, 3); this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; // // AboutDialog // this.AcceptButton = this.OkButton; resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.BackColor = System.Drawing.Color.White; this.CancelButton = this.OkButton; this.Controls.Add(this.tableLayoutPanel1); this.Controls.Add(this.pictureBox1); this.HelpButton = false; this.Name = "AboutDialog"; ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Label label2; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Label VersionLabel; private System.Windows.Forms.Button OkButton; private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; } }
Java
# Copyright (c) 2013, Ruslan Baratov # All rights reserved. # !!! DO NOT PLACE HEADER GUARDS HERE !!! include(hunter_add_version) include(hunter_cacheable) include(hunter_download) include(hunter_pick_scheme) include(hunter_cmake_args) hunter_add_version( PACKAGE_NAME GTest VERSION "1.7.0-hunter" URL "https://github.com/hunter-packages/gtest/archive/v1.7.0-hunter.tar.gz" SHA1 1ed1c26d11fb592056c1cb912bd3c784afa96eaa ) hunter_add_version( PACKAGE_NAME GTest VERSION "1.7.0-hunter-1" URL "https://github.com/hunter-packages/gtest/archive/v1.7.0-hunter-1.tar.gz" SHA1 0cb1dcf75e144ad052d3f1e4923a7773bf9b494f ) hunter_add_version( PACKAGE_NAME GTest VERSION "1.7.0-hunter-2" URL "https://github.com/hunter-packages/gtest/archive/v1.7.0-hunter-2.tar.gz" SHA1 e62b2ef70308f63c32c560f7b6e252442eed4d57 ) hunter_add_version( PACKAGE_NAME GTest VERSION "1.7.0-hunter-3" URL "https://github.com/hunter-packages/gtest/archive/v1.7.0-hunter-3.tar.gz" SHA1 fea7d3020e20f059255484c69755753ccadf6362 ) hunter_add_version( PACKAGE_NAME GTest VERSION "1.7.0-hunter-4" URL "https://github.com/hunter-packages/gtest/archive/v1.7.0-hunter-4.tar.gz" SHA1 9b439c0c25437a083957b197ac6905662a5d901b ) hunter_add_version( PACKAGE_NAME GTest VERSION "1.7.0-hunter-5" URL "https://github.com/hunter-packages/gtest/archive/v1.7.0-hunter-5.tar.gz" SHA1 796804df3facb074087a4d8ba6f652e5ac69ad7f ) hunter_add_version( PACKAGE_NAME GTest VERSION "1.7.0-hunter-6" URL "https://github.com/hunter-packages/gtest/archive/v1.7.0-hunter-6.tar.gz" SHA1 64b93147abe287da8fe4e18cfd54ba9297dafb82 ) hunter_add_version( PACKAGE_NAME GTest VERSION "1.7.0-hunter-7" URL "https://github.com/hunter-packages/gtest/archive/v1.7.0-hunter-7.tar.gz" SHA1 19b5c98747768bcd0622714f2ed40f17aee406b2 ) hunter_add_version( PACKAGE_NAME GTest VERSION "1.7.0-hunter-8" URL "https://github.com/hunter-packages/gtest/archive/v1.7.0-hunter-8.tar.gz" SHA1 ac4d2215aa1b1d745a096e5e3b2dbe0c0f229ea5 ) hunter_add_version( PACKAGE_NAME GTest VERSION "1.7.0-hunter-9" URL "https://github.com/hunter-packages/gtest/archive/v1.7.0-hunter-9.tar.gz" SHA1 8a47fe9c4e550f4ed0e2c05388dd291a059223d9 ) hunter_add_version( PACKAGE_NAME GTest VERSION "1.7.0-hunter-10" URL "https://github.com/hunter-packages/gtest/archive/v1.7.0-hunter-10.tar.gz" SHA1 374e6dbe8619ab467c6b1a0b470a598407b172e9 ) hunter_add_version( PACKAGE_NAME GTest VERSION "1.7.0-hunter-11" URL "https://github.com/hunter-packages/gtest/archive/v1.7.0-hunter-11.tar.gz" SHA1 c6ae948ca2bea1d734af01b1069491b00933ed31 ) hunter_add_version( PACKAGE_NAME GTest VERSION 1.8.0-hunter-p2 URL "https://github.com/hunter-packages/googletest/archive/1.8.0-hunter-p2.tar.gz" SHA1 93148cb8850abe78b76ed87158fdb6b9c48e38c4 ) hunter_add_version( PACKAGE_NAME GTest VERSION 1.8.0-hunter-p5 URL https://github.com/hunter-packages/googletest/archive/1.8.0-hunter-p5.tar.gz SHA1 3325aa4fc8b30e665c9f73a60f19387b7db36f85 ) if(HUNTER_GTest_VERSION VERSION_LESS 1.8.0) set(_gtest_license "LICENSE") else() set(_gtest_license "googletest/LICENSE") endif() hunter_cmake_args( GTest CMAKE_ARGS HUNTER_INSTALL_LICENSE_FILES=${_gtest_license} ) hunter_pick_scheme(DEFAULT url_sha1_cmake) hunter_cacheable(GTest) hunter_download(PACKAGE_NAME GTest PACKAGE_INTERNAL_DEPS_ID 1)
Java
class Cpm < Formula desc "Fast CPAN module installer" homepage "https://metacpan.org/pod/cpm" url "https://cpan.metacpan.org/authors/id/S/SK/SKAJI/App-cpm-0.997002.tar.gz" sha256 "19de1224b5c86d566eb0b85767775efb5bbab82ce98ee8c44f8843f26aabbbab" license any_of: ["Artistic-1.0-Perl", "GPL-1.0-or-later"] head "https://github.com/skaji/cpm.git" bottle do sha256 cellar: :any_skip_relocation, arm64_big_sur: "ec077e8877216d394c00f4bae315edc76d0dd293d1d24b691526ee596766dcc9" sha256 cellar: :any_skip_relocation, big_sur: "c80c08f2faf3be4f3ffe1577c1002b2a9d44efbe66c8eae8068c2b68b537134f" sha256 cellar: :any_skip_relocation, catalina: "5ee136ba90a46455007f9e8f5f3de12d55dc8bb888f366c03838cdbc52ab6f63" sha256 cellar: :any_skip_relocation, mojave: "570d8a40888cc518229910ab30d0ee8c89a0b72a86d8cc12cea8222df885d5cb" end depends_on "perl" resource "Module::Build::Tiny" do url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-Tiny-0.039.tar.gz" sha256 "7d580ff6ace0cbe555bf36b86dc8ea232581530cbeaaea09bccb57b55797f11c" end resource "CPAN::Common::Index" do url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/CPAN-Common-Index-0.010.tar.gz" sha256 "c43ddbb22fd42b06118fe6357f53700fbd77f531ba3c427faafbf303cbf4eaf0" end resource "CPAN::DistnameInfo" do url "https://cpan.metacpan.org/authors/id/G/GB/GBARR/CPAN-DistnameInfo-0.12.tar.gz" sha256 "2f24fbe9f7eeacbc269d35fc61618322fc17be499ee0cd9018f370934a9f2435" end resource "CPAN::Meta::Check" do url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/CPAN-Meta-Check-0.014.tar.gz" sha256 "28a0572bfc1c0678d9ce7da48cf521097ada230f96eb3d063fcbae1cfe6a351f" end resource "Capture::Tiny" do url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.48.tar.gz" sha256 "6c23113e87bad393308c90a207013e505f659274736638d8c79bac9c67cc3e19" end resource "Class::Tiny" do url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Class-Tiny-1.008.tar.gz" sha256 "ee058a63912fa1fcb9a72498f56ca421a2056dc7f9f4b67837446d6421815615" end resource "Command::Runner" do url "https://cpan.metacpan.org/authors/id/S/SK/SKAJI/Command-Runner-0.103.tar.gz" sha256 "0f180b5c3b3fc9db7b83d4a5fdd959db34f7d6d2472f817dbf8b4b795a9dc82a" end resource "ExtUtils::Config" do url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Config-0.008.tar.gz" sha256 "ae5104f634650dce8a79b7ed13fb59d67a39c213a6776cfdaa3ee749e62f1a8c" end resource "ExtUtils::Helpers" do url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Helpers-0.026.tar.gz" sha256 "de901b6790a4557cf4ec908149e035783b125bf115eb9640feb1bc1c24c33416" end resource "ExtUtils::InstallPaths" do url "https://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-InstallPaths-0.012.tar.gz" sha256 "84735e3037bab1fdffa3c2508567ad412a785c91599db3c12593a50a1dd434ed" end resource "ExtUtils::MakeMaker::CPANfile" do url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/ExtUtils-MakeMaker-CPANfile-0.09.tar.gz" sha256 "2c077607d4b0a108569074dff76e8168659062ada3a6af78b30cca0d40f8e275" end resource "File::Copy::Recursive" do url "https://cpan.metacpan.org/authors/id/D/DM/DMUEY/File-Copy-Recursive-0.45.tar.gz" sha256 "d3971cf78a8345e38042b208bb7b39cb695080386af629f4a04ffd6549df1157" end resource "File::Which" do url "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Which-1.23.tar.gz" sha256 "b79dc2244b2d97b6f27167fc3b7799ef61a179040f3abd76ce1e0a3b0bc4e078" end resource "File::pushd" do url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/File-pushd-1.016.tar.gz" sha256 "d73a7f09442983b098260df3df7a832a5f660773a313ca273fa8b56665f97cdc" end resource "HTTP::Tinyish" do url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/HTTP-Tinyish-0.17.tar.gz" sha256 "47bd111e474566d733c41870e2374c81689db5e0b5a43adc48adb665d89fb067" end resource "IPC::Run3" do url "https://cpan.metacpan.org/authors/id/R/RJ/RJBS/IPC-Run3-0.048.tar.gz" sha256 "3d81c3cc1b5cff69cca9361e2c6e38df0352251ae7b41e2ff3febc850e463565" end resource "Menlo" do url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Menlo-1.9019.tar.gz" sha256 "3b573f68e7b3a36a87c860be258599330fac248b518854dfb5657ac483dca565" end resource "Menlo::Legacy" do url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Menlo-Legacy-1.9022.tar.gz" sha256 "a6acac3fee318a804b439de54acbc7c27f0b44cfdad8551bbc9cd45986abc201" end resource "Module::CPANfile" do url "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Module-CPANfile-1.1004.tar.gz" sha256 "88efbe2e9a642dceaa186430fedfcf999aaf0e06f6cced28a714b8e56b514921" end resource "Parallel::Pipes" do url "https://cpan.metacpan.org/authors/id/S/SK/SKAJI/Parallel-Pipes-0.005.tar.gz" sha256 "44bd9e2be33d7b314f81c9b886a95d53514689090635f9fad53181f2d3051fd5" end resource "Parse::PMFile" do url "https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/Parse-PMFile-0.43.tar.gz" sha256 "be61e807204738cf0c52ed321551992fdc7fa8faa43ed43ff489d0c269900623" end resource "String::ShellQuote" do url "https://cpan.metacpan.org/authors/id/R/RO/ROSCH/String-ShellQuote-1.04.tar.gz" sha256 "e606365038ce20d646d255c805effdd32f86475f18d43ca75455b00e4d86dd35" end resource "Tie::Handle::Offset" do url "https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Tie-Handle-Offset-0.004.tar.gz" sha256 "ee9f39055dc695aa244a252f56ffd37f8be07209b337ad387824721206d2a89e" end resource "URI" do url "https://cpan.metacpan.org/authors/id/O/OA/OALDERS/URI-5.07.tar.gz" sha256 "eeb6ed2ae212434e2021e29f7556f4024169421a5d8b001a89e65982944131ea" end resource "Win32::ShellQuote" do url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Win32-ShellQuote-0.003001.tar.gz" sha256 "aa74b0e3dc2d41cd63f62f853e521ffd76b8d823479a2619e22edb4049b4c0dc" end resource "YAML::PP" do url "https://cpan.metacpan.org/authors/id/T/TI/TINITA/YAML-PP-0.026.tar.gz" sha256 "4b858e671cf3e966ecc54408e8031740c2f28f87c294ee9679fb02e02d5a45eb" end resource "local::lib" do url "https://cpan.metacpan.org/authors/id/H/HA/HAARG/local-lib-2.000024.tar.gz" sha256 "2e9b917bd48a0615e42633b2a327494e04610d8f710765b9493d306cead98a05" end def install ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" build_pl = [ "Module::Build::Tiny", "Command::Runner", "Parallel::Pipes", ] resources.each do |r| r.stage do next if build_pl.include? r.name system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" system "make", "install" end end build_pl.each do |name| resource(name).stage do system "perl", "Build.PL", "--install_base", libexec system "./Build" system "./Build", "install" end end system "perl", "Build.PL", "--install_base", libexec system "./Build" system "./Build", "install" (bin/"cpm").write_env_script("#{libexec}/bin/cpm", PERL5LIB: ENV["PERL5LIB"]) man1.install_symlink libexec/"man/man1/cpm.1" man3.install_symlink Dir[libexec/"man/man3/App::cpm*"].reject { |f| File.empty?(f) } end test do system bin/"cpm", "install", "Perl::Tutorial" expected = <<~EOS NAME Perl::Tutorial::HelloWorld - Hello World for Perl SYNOPSIS #!/usr/bin/perl # # The traditional first program. # Strict and warnings are recommended. use strict; use warnings; # Print a message. print "Hello, World!\\n"; EOS assert_match expected, shell_output("PERL5LIB=local/lib/perl5 perldoc Perl::Tutorial::HelloWorld") end end
Java
package tcp import ( "expvar" "fmt" "time" "github.com/elastic/beats/libbeat/common" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/packetbeat/flows" "github.com/elastic/beats/packetbeat/protos" "github.com/tsg/gopacket/layers" ) const TCP_MAX_DATA_IN_STREAM = 10 * (1 << 20) const ( TcpDirectionReverse = 0 TcpDirectionOriginal = 1 ) type Tcp struct { id uint32 streams *common.Cache portMap map[uint16]protos.Protocol protocols protos.Protocols } type Processor interface { Process(flow *flows.FlowID, hdr *layers.TCP, pkt *protos.Packet) } var ( droppedBecauseOfGaps = expvar.NewInt("tcp.dropped_because_of_gaps") ) type seqCompare int const ( seqLT seqCompare = -1 seqEq seqCompare = 0 seqGT seqCompare = 1 ) var ( debugf = logp.MakeDebug("tcp") isDebug = false ) func (tcp *Tcp) getId() uint32 { tcp.id += 1 return tcp.id } func (tcp *Tcp) decideProtocol(tuple *common.IpPortTuple) protos.Protocol { protocol, exists := tcp.portMap[tuple.Src_port] if exists { return protocol } protocol, exists = tcp.portMap[tuple.Dst_port] if exists { return protocol } return protos.UnknownProtocol } func (tcp *Tcp) findStream(k common.HashableIpPortTuple) *TcpConnection { v := tcp.streams.Get(k) if v != nil { return v.(*TcpConnection) } return nil } type TcpConnection struct { id uint32 tuple *common.IpPortTuple protocol protos.Protocol tcptuple common.TcpTuple tcp *Tcp lastSeq [2]uint32 // protocols private data data protos.ProtocolData } type TcpStream struct { conn *TcpConnection dir uint8 } func (conn *TcpConnection) String() string { return fmt.Sprintf("TcpStream id[%d] tuple[%s] protocol[%s] lastSeq[%d %d]", conn.id, conn.tuple, conn.protocol, conn.lastSeq[0], conn.lastSeq[1]) } func (stream *TcpStream) addPacket(pkt *protos.Packet, tcphdr *layers.TCP) { conn := stream.conn mod := conn.tcp.protocols.GetTcp(conn.protocol) if mod == nil { if isDebug { protocol := conn.protocol debugf("Ignoring protocol for which we have no module loaded: %s", protocol) } return } if len(pkt.Payload) > 0 { conn.data = mod.Parse(pkt, &conn.tcptuple, stream.dir, conn.data) } if tcphdr.FIN { conn.data = mod.ReceivedFin(&conn.tcptuple, stream.dir, conn.data) } } func (stream *TcpStream) gapInStream(nbytes int) (drop bool) { conn := stream.conn mod := conn.tcp.protocols.GetTcp(conn.protocol) conn.data, drop = mod.GapInStream(&conn.tcptuple, stream.dir, nbytes, conn.data) return drop } func (tcp *Tcp) Process(id *flows.FlowID, tcphdr *layers.TCP, pkt *protos.Packet) { // This Recover should catch all exceptions in // protocol modules. defer logp.Recover("Process tcp exception") stream, created := tcp.getStream(pkt) if stream.conn == nil { return } conn := stream.conn if id != nil { id.AddConnectionID(uint64(conn.id)) } if isDebug { debugf("tcp flow id: %p", id) } if len(pkt.Payload) == 0 && !tcphdr.FIN { // return early if packet is not interesting. Still need to find/create // stream first in order to update the TCP stream timer return } tcpStartSeq := tcphdr.Seq tcpSeq := tcpStartSeq + uint32(len(pkt.Payload)) lastSeq := conn.lastSeq[stream.dir] if isDebug { debugf("pkt.start_seq=%v pkt.last_seq=%v stream.last_seq=%v (len=%d)", tcpStartSeq, tcpSeq, lastSeq, len(pkt.Payload)) } if len(pkt.Payload) > 0 && lastSeq != 0 { if tcpSeqBeforeEq(tcpSeq, lastSeq) { if isDebug { debugf("Ignoring retransmitted segment. pkt.seq=%v len=%v stream.seq=%v", tcphdr.Seq, len(pkt.Payload), lastSeq) } return } switch tcpSeqCompare(lastSeq, tcpStartSeq) { case seqLT: // lastSeq < tcpStartSeq => Gap in tcp stream detected if created { break } gap := int(tcpStartSeq - lastSeq) debugf("Gap in tcp stream. last_seq: %d, seq: %d, gap: %d", lastSeq, tcpStartSeq, gap) drop := stream.gapInStream(gap) if drop { if isDebug { debugf("Dropping connection state because of gap") } droppedBecauseOfGaps.Add(1) // drop application layer connection state and // update stream_id for app layer analysers using stream_id for lookups conn.id = tcp.getId() conn.data = nil } case seqGT: // lastSeq > tcpStartSeq => overlapping TCP segment detected. shrink packet delta := lastSeq - tcpStartSeq if isDebug { debugf("Overlapping tcp segment. last_seq %d, seq: %d, delta: %d", lastSeq, tcpStartSeq, delta) } pkt.Payload = pkt.Payload[delta:] tcphdr.Seq += delta } } conn.lastSeq[stream.dir] = tcpSeq stream.addPacket(pkt, tcphdr) } func (tcp *Tcp) getStream(pkt *protos.Packet) (stream TcpStream, created bool) { if conn := tcp.findStream(pkt.Tuple.Hashable()); conn != nil { return TcpStream{conn: conn, dir: TcpDirectionOriginal}, false } if conn := tcp.findStream(pkt.Tuple.RevHashable()); conn != nil { return TcpStream{conn: conn, dir: TcpDirectionReverse}, false } protocol := tcp.decideProtocol(&pkt.Tuple) if protocol == protos.UnknownProtocol { // don't follow return TcpStream{}, false } var timeout time.Duration mod := tcp.protocols.GetTcp(protocol) if mod != nil { timeout = mod.ConnectionTimeout() } if isDebug { t := pkt.Tuple debugf("Connection src[%s:%d] dst[%s:%d] doesn't exist, creating new", t.Src_ip.String(), t.Src_port, t.Dst_ip.String(), t.Dst_port) } conn := &TcpConnection{ id: tcp.getId(), tuple: &pkt.Tuple, protocol: protocol, tcp: tcp} conn.tcptuple = common.TcpTupleFromIpPort(conn.tuple, conn.id) tcp.streams.PutWithTimeout(pkt.Tuple.Hashable(), conn, timeout) return TcpStream{conn: conn, dir: TcpDirectionOriginal}, true } func tcpSeqCompare(seq1, seq2 uint32) seqCompare { i := int32(seq1 - seq2) switch { case i == 0: return seqEq case i < 0: return seqLT default: return seqGT } } func tcpSeqBefore(seq1 uint32, seq2 uint32) bool { return int32(seq1-seq2) < 0 } func tcpSeqBeforeEq(seq1 uint32, seq2 uint32) bool { return int32(seq1-seq2) <= 0 } func buildPortsMap(plugins map[protos.Protocol]protos.TcpPlugin) (map[uint16]protos.Protocol, error) { var res = map[uint16]protos.Protocol{} for proto, protoPlugin := range plugins { for _, port := range protoPlugin.GetPorts() { old_proto, exists := res[uint16(port)] if exists { if old_proto == proto { continue } return nil, fmt.Errorf("Duplicate port (%d) exists in %s and %s protocols", port, old_proto, proto) } res[uint16(port)] = proto } } return res, nil } // Creates and returns a new Tcp. func NewTcp(p protos.Protocols) (*Tcp, error) { isDebug = logp.IsDebug("tcp") portMap, err := buildPortsMap(p.GetAllTcp()) if err != nil { return nil, err } tcp := &Tcp{ protocols: p, portMap: portMap, streams: common.NewCache( protos.DefaultTransactionExpiration, protos.DefaultTransactionHashSize), } tcp.streams.StartJanitor(protos.DefaultTransactionExpiration) if isDebug { debugf("tcp", "Port map: %v", portMap) } return tcp, nil }
Java
import batoid import numpy as np from test_helpers import timer, do_pickle, all_obj_diff, init_gpu, rays_allclose @timer def test_properties(): rng = np.random.default_rng(5) for i in range(100): R = rng.normal(0.0, 0.3) # negative allowed sphere = batoid.Sphere(R) assert sphere.R == R do_pickle(sphere) @timer def test_sag(): rng = np.random.default_rng(57) for i in range(100): R = 1./rng.normal(0.0, 0.3) sphere = batoid.Sphere(R) for j in range(10): x = rng.uniform(-0.7*abs(R), 0.7*abs(R)) y = rng.uniform(-0.7*abs(R), 0.7*abs(R)) result = sphere.sag(x, y) np.testing.assert_allclose( result, R*(1-np.sqrt(1.0-(x*x + y*y)/R/R)) ) # Check that it returned a scalar float and not an array assert isinstance(result, float) # Check 0,0 np.testing.assert_allclose(sphere.sag(0, 0), 0.0, rtol=0, atol=1e-17) # Check vectorization x = rng.uniform(-0.7*abs(R), 0.7*abs(R), size=(10, 10)) y = rng.uniform(-0.7*abs(R), 0.7*abs(R), size=(10, 10)) np.testing.assert_allclose( sphere.sag(x, y), R*(1-np.sqrt(1.0-(x*x + y*y)/R/R)) ) # Make sure non-unit stride arrays also work np.testing.assert_allclose( sphere.sag(x[::5,::2], y[::5,::2]), R*(1-np.sqrt(1.0-(x*x + y*y)/R/R))[::5,::2] ) do_pickle(sphere) @timer def test_normal(): rng = np.random.default_rng(577) for i in range(100): R = 1./rng.normal(0.0, 0.3) sphere = batoid.Sphere(R) for j in range(10): x = rng.uniform(-0.7*abs(R), 0.7*abs(R)) y = rng.uniform(-0.7*abs(R), 0.7*abs(R)) result = sphere.normal(x, y) r = np.hypot(x, y) rat = r/R dzdr = rat/np.sqrt(1-rat*rat) nz = 1/np.sqrt(1+dzdr*dzdr) normal = np.array([-x/r*dzdr*nz, -y/r*dzdr*nz, nz]) np.testing.assert_allclose(result, normal) # Check 0,0 np.testing.assert_equal(sphere.normal(0, 0), np.array([0, 0, 1])) # Check vectorization x = rng.uniform(-0.7*abs(R), 0.7*abs(R), size=(10, 10)) y = rng.uniform(-0.7*abs(R), 0.7*abs(R), size=(10, 10)) r = np.hypot(x, y) rat = r/R dzdr = rat/np.sqrt(1-rat*rat) nz = 1/np.sqrt(1+dzdr*dzdr) normal = np.dstack([-x/r*dzdr*nz, -y/r*dzdr*nz, nz]) np.testing.assert_allclose( sphere.normal(x, y), normal ) # Make sure non-unit stride arrays also work np.testing.assert_allclose( sphere.normal(x[::5,::2], y[::5,::2]), normal[::5, ::2] ) @timer def test_intersect(): rng = np.random.default_rng(5772) size = 10_000 for i in range(100): R = 1./rng.normal(0.0, 0.3) sphereCoordSys = batoid.CoordSys(origin=[0, 0, -1]) sphere = batoid.Sphere(R) x = rng.uniform(-0.3*abs(R), 0.3*abs(R), size=size) y = rng.uniform(-0.3*abs(R), 0.3*abs(R), size=size) z = np.full_like(x, -2*abs(R)) # If we shoot rays straight up, then it's easy to predict the intersection vx = np.zeros_like(x) vy = np.zeros_like(x) vz = np.ones_like(x) rv = batoid.RayVector(x, y, z, vx, vy, vz) np.testing.assert_allclose(rv.z, -2*abs(R)) rv2 = batoid.intersect(sphere, rv.copy(), sphereCoordSys) assert rv2.coordSys == sphereCoordSys rv2 = rv2.toCoordSys(batoid.CoordSys()) np.testing.assert_allclose(rv2.x, x) np.testing.assert_allclose(rv2.y, y) np.testing.assert_allclose(rv2.z, sphere.sag(x, y)-1, rtol=0, atol=1e-9) # Check default intersect coordTransform rv2 = rv.copy().toCoordSys(sphereCoordSys) batoid.intersect(sphere, rv2) assert rv2.coordSys == sphereCoordSys rv2 = rv2.toCoordSys(batoid.CoordSys()) np.testing.assert_allclose(rv2.x, x) np.testing.assert_allclose(rv2.y, y) np.testing.assert_allclose(rv2.z, sphere.sag(x, y)-1, rtol=0, atol=1e-9) @timer def test_reflect(): rng = np.random.default_rng(57721) size = 10_000 for i in range(100): R = 1./rng.normal(0.0, 0.3) sphere = batoid.Sphere(R) x = rng.uniform(-0.3*abs(R), 0.3*abs(R), size=size) y = rng.uniform(-0.3*abs(R), 0.3*abs(R), size=size) z = np.full_like(x, -2*abs(R)) vx = rng.uniform(-1e-5, 1e-5, size=size) vy = rng.uniform(-1e-5, 1e-5, size=size) vz = np.full_like(x, 1) rv = batoid.RayVector(x, y, z, vx, vy, vz) rvr = batoid.reflect(sphere, rv.copy()) rvr2 = sphere.reflect(rv.copy()) rays_allclose(rvr, rvr2) # print(f"{np.sum(rvr.failed)/len(rvr)*100:.2f}% failed") normal = sphere.normal(rvr.x, rvr.y) # Test law of reflection a0 = np.einsum("ad,ad->a", normal, rv.v)[~rvr.failed] a1 = np.einsum("ad,ad->a", normal, -rvr.v)[~rvr.failed] np.testing.assert_allclose( a0, a1, rtol=0, atol=1e-12 ) # Test that rv.v, rvr.v and normal are all in the same plane np.testing.assert_allclose( np.einsum( "ad,ad->a", np.cross(normal, rv.v), rv.v )[~rvr.failed], 0.0, rtol=0, atol=1e-12 ) @timer def test_refract(): rng = np.random.default_rng(577215) size = 10_000 for i in range(100): R = 1./rng.normal(0.0, 0.3) sphere = batoid.Sphere(R) m0 = batoid.ConstMedium(rng.normal(1.2, 0.01)) m1 = batoid.ConstMedium(rng.normal(1.3, 0.01)) x = rng.uniform(-0.3*abs(R), 0.3*abs(R), size=size) y = rng.uniform(-0.3*abs(R), 0.3*abs(R), size=size) z = np.full_like(x, -2*abs(R)) vx = rng.uniform(-1e-5, 1e-5, size=size) vy = rng.uniform(-1e-5, 1e-5, size=size) vz = np.sqrt(1-vx*vx-vy*vy)/m0.n rv = batoid.RayVector(x, y, z, vx, vy, vz) rvr = batoid.refract(sphere, rv.copy(), m0, m1) rvr2 = sphere.refract(rv.copy(), m0, m1) rays_allclose(rvr, rvr2) # print(f"{np.sum(rvr.failed)/len(rvr)*100:.2f}% failed") normal = sphere.normal(rvr.x, rvr.y) # Test Snell's law s0 = np.sum(np.cross(normal, rv.v*m0.n)[~rvr.failed], axis=-1) s1 = np.sum(np.cross(normal, rvr.v*m1.n)[~rvr.failed], axis=-1) np.testing.assert_allclose( m0.n*s0, m1.n*s1, rtol=0, atol=1e-9 ) # Test that rv.v, rvr.v and normal are all in the same plane np.testing.assert_allclose( np.einsum( "ad,ad->a", np.cross(normal, rv.v), rv.v )[~rvr.failed], 0.0, rtol=0, atol=1e-12 ) @timer def test_ne(): objs = [ batoid.Sphere(1.0), batoid.Sphere(2.0), batoid.Plane() ] all_obj_diff(objs) @timer def test_fail(): sphere = batoid.Sphere(1.0) rv = batoid.RayVector(0, 10, 0, 0, 0, -1) # Too far to side rv2 = batoid.intersect(sphere, rv.copy()) np.testing.assert_equal(rv2.failed, np.array([True])) # This one passes rv = batoid.RayVector(0, 0, 0, 0, 0, -1) rv2 = batoid.intersect(sphere, rv.copy()) np.testing.assert_equal(rv2.failed, np.array([False])) if __name__ == '__main__': test_properties() test_sag() test_normal() test_intersect() test_reflect() test_refract() test_ne() test_fail()
Java
/* $Id$ */ #include "platform.h" #include "di_defs.h" #include "pc.h" #include "dqueue.h" #include "adapter.h" #include "entity.h" #include "um_xdi.h" #include "um_idi.h" #include "debuglib.h" #include "divasync.h" #define DIVAS_MAX_XDI_ADAPTERS 64 /* -------------------------------------------------------------------------- IMPORTS -------------------------------------------------------------------------- */ extern void diva_os_wakeup_read(void *os_context); extern void diva_os_wakeup_close(void *os_context); /* -------------------------------------------------------------------------- LOCALS -------------------------------------------------------------------------- */ static LIST_HEAD(adapter_q); static diva_os_spin_lock_t adapter_lock; static diva_um_idi_adapter_t *diva_um_idi_find_adapter(dword nr); static void cleanup_adapter(diva_um_idi_adapter_t *a); static void cleanup_entity(divas_um_idi_entity_t *e); static int diva_user_mode_idi_adapter_features(diva_um_idi_adapter_t *a, diva_um_idi_adapter_features_t *features); static int process_idi_request(divas_um_idi_entity_t *e, const diva_um_idi_req_hdr_t *req); static int process_idi_rc(divas_um_idi_entity_t *e, byte rc); static int process_idi_ind(divas_um_idi_entity_t *e, byte ind); static int write_return_code(divas_um_idi_entity_t *e, byte rc); /* -------------------------------------------------------------------------- MAIN -------------------------------------------------------------------------- */ int diva_user_mode_idi_init(void) { diva_os_initialize_spin_lock(&adapter_lock, "adapter"); return (0); } /* -------------------------------------------------------------------------- Copy adapter features to user supplied buffer -------------------------------------------------------------------------- */ static int diva_user_mode_idi_adapter_features(diva_um_idi_adapter_t *a, diva_um_idi_adapter_features_t * features) { IDI_SYNC_REQ sync_req; if ((a) && (a->d.request)) { features->type = a->d.type; features->features = a->d.features; features->channels = a->d.channels; memset(features->name, 0, sizeof(features->name)); sync_req.GetName.Req = 0; sync_req.GetName.Rc = IDI_SYNC_REQ_GET_NAME; (*(a->d.request)) ((ENTITY *)&sync_req); strlcpy(features->name, sync_req.GetName.name, sizeof(features->name)); sync_req.GetSerial.Req = 0; sync_req.GetSerial.Rc = IDI_SYNC_REQ_GET_SERIAL; sync_req.GetSerial.serial = 0; (*(a->d.request))((ENTITY *)&sync_req); features->serial_number = sync_req.GetSerial.serial; } return ((a) ? 0 : -1); } /* -------------------------------------------------------------------------- REMOVE ADAPTER -------------------------------------------------------------------------- */ void diva_user_mode_idi_remove_adapter(int adapter_nr) { struct list_head *tmp; diva_um_idi_adapter_t *a; list_for_each(tmp, &adapter_q) { a = list_entry(tmp, diva_um_idi_adapter_t, link); if (a->adapter_nr == adapter_nr) { list_del(tmp); cleanup_adapter(a); DBG_LOG(("DIDD: del adapter(%d)", a->adapter_nr)); diva_os_free(0, a); break; } } } /* -------------------------------------------------------------------------- CALLED ON DRIVER EXIT (UNLOAD) -------------------------------------------------------------------------- */ void diva_user_mode_idi_finit(void) { struct list_head *tmp, *safe; diva_um_idi_adapter_t *a; list_for_each_safe(tmp, safe, &adapter_q) { a = list_entry(tmp, diva_um_idi_adapter_t, link); list_del(tmp); cleanup_adapter(a); DBG_LOG(("DIDD: del adapter(%d)", a->adapter_nr)); diva_os_free(0, a); } diva_os_destroy_spin_lock(&adapter_lock, "adapter"); } /* ------------------------------------------------------------------------- CREATE AND INIT IDI ADAPTER ------------------------------------------------------------------------- */ int diva_user_mode_idi_create_adapter(const DESCRIPTOR *d, int adapter_nr) { diva_os_spin_lock_magic_t old_irql; diva_um_idi_adapter_t *a = (diva_um_idi_adapter_t *) diva_os_malloc(0, sizeof (diva_um_idi_adapter_t)); if (!a) { return (-1); } memset(a, 0x00, sizeof(*a)); INIT_LIST_HEAD(&a->entity_q); a->d = *d; a->adapter_nr = adapter_nr; DBG_LOG(("DIDD_ADD A(%d), type:%02x, features:%04x, channels:%d", adapter_nr, a->d.type, a->d.features, a->d.channels)); diva_os_enter_spin_lock(&adapter_lock, &old_irql, "create_adapter"); list_add_tail(&a->link, &adapter_q); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "create_adapter"); return (0); } /* ------------------------------------------------------------------------ Find adapter by Adapter number ------------------------------------------------------------------------ */ static diva_um_idi_adapter_t *diva_um_idi_find_adapter(dword nr) { diva_um_idi_adapter_t *a = NULL; struct list_head *tmp; list_for_each(tmp, &adapter_q) { a = list_entry(tmp, diva_um_idi_adapter_t, link); DBG_TRC(("find_adapter: (%d)-(%d)", nr, a->adapter_nr)); if (a->adapter_nr == (int)nr) break; a = NULL; } return (a); } /* ------------------------------------------------------------------------ Cleanup this adapter and cleanup/delete all entities assigned to this adapter ------------------------------------------------------------------------ */ static void cleanup_adapter(diva_um_idi_adapter_t *a) { struct list_head *tmp, *safe; divas_um_idi_entity_t *e; list_for_each_safe(tmp, safe, &a->entity_q) { e = list_entry(tmp, divas_um_idi_entity_t, link); list_del(tmp); cleanup_entity(e); if (e->os_context) { diva_os_wakeup_read(e->os_context); diva_os_wakeup_close(e->os_context); } } memset(&a->d, 0x00, sizeof(DESCRIPTOR)); } /* ------------------------------------------------------------------------ Cleanup, but NOT delete this entity ------------------------------------------------------------------------ */ static void cleanup_entity(divas_um_idi_entity_t *e) { e->os_ref = NULL; e->status = 0; e->adapter = NULL; e->e.Id = 0; e->rc_count = 0; e->status |= DIVA_UM_IDI_REMOVED; e->status |= DIVA_UM_IDI_REMOVE_PENDING; diva_data_q_finit(&e->data); diva_data_q_finit(&e->rc); } /* ------------------------------------------------------------------------ Create ENTITY, link it to the adapter and remove pointer to entity ------------------------------------------------------------------------ */ void *divas_um_idi_create_entity(dword adapter_nr, void *file) { divas_um_idi_entity_t *e; diva_um_idi_adapter_t *a; diva_os_spin_lock_magic_t old_irql; if ((e = (divas_um_idi_entity_t *) diva_os_malloc(0, sizeof(*e)))) { memset(e, 0x00, sizeof(*e)); if (! (e->os_context = diva_os_malloc(0, diva_os_get_context_size()))) { DBG_LOG(("E(%08x) no memory for os context", e)); diva_os_free(0, e); return NULL; } memset(e->os_context, 0x00, diva_os_get_context_size()); if ((diva_data_q_init(&e->data, 2048 + 512, 16))) { diva_os_free(0, e->os_context); diva_os_free(0, e); return NULL; } if ((diva_data_q_init(&e->rc, sizeof(diva_um_idi_ind_hdr_t), 2))) { diva_data_q_finit(&e->data); diva_os_free(0, e->os_context); diva_os_free(0, e); return NULL; } diva_os_enter_spin_lock(&adapter_lock, &old_irql, "create_entity"); /* Look for Adapter requested */ if (!(a = diva_um_idi_find_adapter(adapter_nr))) { /* No adapter was found, or this adapter was removed */ diva_os_leave_spin_lock(&adapter_lock, &old_irql, "create_entity"); DBG_LOG(("A: no adapter(%ld)", adapter_nr)); cleanup_entity(e); diva_os_free(0, e->os_context); diva_os_free(0, e); return NULL; } e->os_ref = file; /* link to os handle */ e->adapter = a; /* link to adapter */ list_add_tail(&e->link, &a->entity_q); /* link from adapter */ diva_os_leave_spin_lock(&adapter_lock, &old_irql, "create_entity"); DBG_LOG(("A(%ld), create E(%08x)", adapter_nr, e)); } return (e); } /* ------------------------------------------------------------------------ Unlink entity and free memory ------------------------------------------------------------------------ */ int divas_um_idi_delete_entity(int adapter_nr, void *entity) { divas_um_idi_entity_t *e; diva_um_idi_adapter_t *a; diva_os_spin_lock_magic_t old_irql; if (!(e = (divas_um_idi_entity_t *) entity)) return (-1); diva_os_enter_spin_lock(&adapter_lock, &old_irql, "delete_entity"); if ((a = e->adapter)) { list_del(&e->link); } diva_os_leave_spin_lock(&adapter_lock, &old_irql, "delete_entity"); diva_um_idi_stop_wdog(entity); cleanup_entity(e); diva_os_free(0, e->os_context); memset(e, 0x00, sizeof(*e)); diva_os_free(0, e); DBG_LOG(("A(%d) remove E:%08x", adapter_nr, e)); return (0); } /* -------------------------------------------------------------------------- Called by application to read data from IDI -------------------------------------------------------------------------- */ int diva_um_idi_read(void *entity, void *os_handle, void *dst, int max_length, divas_um_idi_copy_to_user_fn_t cp_fn) { divas_um_idi_entity_t *e; diva_um_idi_adapter_t *a; const void *data; int length, ret = 0; diva_um_idi_data_queue_t *q; diva_os_spin_lock_magic_t old_irql; diva_os_enter_spin_lock(&adapter_lock, &old_irql, "read"); e = (divas_um_idi_entity_t *) entity; if (!e || (!(a = e->adapter)) || (e->status & DIVA_UM_IDI_REMOVE_PENDING) || (e->status & DIVA_UM_IDI_REMOVED) || (a->status & DIVA_UM_IDI_ADAPTER_REMOVED)) { diva_os_leave_spin_lock(&adapter_lock, &old_irql, "read"); DBG_ERR(("E(%08x) read failed - adapter removed", e)) return (-1); } DBG_TRC(("A(%d) E(%08x) read(%d)", a->adapter_nr, e, max_length)); /* Try to read return code first */ data = diva_data_q_get_segment4read(&e->rc); q = &e->rc; /* No return codes available, read indications now */ if (!data) { if (!(e->status & DIVA_UM_IDI_RC_PENDING)) { DBG_TRC(("A(%d) E(%08x) read data", a->adapter_nr, e)); data = diva_data_q_get_segment4read(&e->data); q = &e->data; } } else { e->status &= ~DIVA_UM_IDI_RC_PENDING; DBG_TRC(("A(%d) E(%08x) read rc", a->adapter_nr, e)); } if (data) { if ((length = diva_data_q_get_segment_length(q)) > max_length) { /* Not enough space to read message */ DBG_ERR(("A: A(%d) E(%08x) read small buffer", a->adapter_nr, e, ret)); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "read"); return (-2); } /* Copy it to user, this function does access ONLY locked an verified memory, also we can access it witch spin lock held */ if ((ret = (*cp_fn) (os_handle, dst, data, length)) >= 0) { /* Acknowledge only if read was successful */ diva_data_q_ack_segment4read(q); } } DBG_TRC(("A(%d) E(%08x) read=%d", a->adapter_nr, e, ret)); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "read"); return (ret); } int diva_um_idi_write(void *entity, void *os_handle, const void *src, int length, divas_um_idi_copy_from_user_fn_t cp_fn) { divas_um_idi_entity_t *e; diva_um_idi_adapter_t *a; diva_um_idi_req_hdr_t *req; void *data; int ret = 0; diva_os_spin_lock_magic_t old_irql; diva_os_enter_spin_lock(&adapter_lock, &old_irql, "write"); e = (divas_um_idi_entity_t *) entity; if (!e || (!(a = e->adapter)) || (e->status & DIVA_UM_IDI_REMOVE_PENDING) || (e->status & DIVA_UM_IDI_REMOVED) || (a->status & DIVA_UM_IDI_ADAPTER_REMOVED)) { diva_os_leave_spin_lock(&adapter_lock, &old_irql, "write"); DBG_ERR(("E(%08x) write failed - adapter removed", e)) return (-1); } DBG_TRC(("A(%d) E(%08x) write(%d)", a->adapter_nr, e, length)); if ((length < sizeof(*req)) || (length > sizeof(e->buffer))) { diva_os_leave_spin_lock(&adapter_lock, &old_irql, "write"); return (-2); } if (e->status & DIVA_UM_IDI_RC_PENDING) { DBG_ERR(("A: A(%d) E(%08x) rc pending", a->adapter_nr, e)); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "write"); return (-1); /* should wait for RC code first */ } /* Copy function does access only locked verified memory, also it can be called with spin lock held */ if ((ret = (*cp_fn) (os_handle, e->buffer, src, length)) < 0) { DBG_TRC(("A: A(%d) E(%08x) write error=%d", a->adapter_nr, e, ret)); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "write"); return (ret); } req = (diva_um_idi_req_hdr_t *)&e->buffer[0]; switch (req->type) { case DIVA_UM_IDI_GET_FEATURES:{ DBG_LOG(("A(%d) get_features", a->adapter_nr)); if (!(data = diva_data_q_get_segment4write(&e->data))) { DBG_ERR(("A(%d) get_features, no free buffer", a->adapter_nr)); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "write"); return (0); } diva_user_mode_idi_adapter_features(a, &(((diva_um_idi_ind_hdr_t *) data)->hdr.features)); ((diva_um_idi_ind_hdr_t *) data)->type = DIVA_UM_IDI_IND_FEATURES; ((diva_um_idi_ind_hdr_t *) data)->data_length = 0; diva_data_q_ack_segment4write(&e->data, sizeof(diva_um_idi_ind_hdr_t)); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "write"); diva_os_wakeup_read(e->os_context); } break; case DIVA_UM_IDI_REQ: case DIVA_UM_IDI_REQ_MAN: case DIVA_UM_IDI_REQ_SIG: case DIVA_UM_IDI_REQ_NET: DBG_TRC(("A(%d) REQ(%02d)-(%02d)-(%08x)", a->adapter_nr, req->Req, req->ReqCh, req->type & DIVA_UM_IDI_REQ_TYPE_MASK)); switch (process_idi_request(e, req)) { case -1: diva_os_leave_spin_lock(&adapter_lock, &old_irql, "write"); return (-1); case -2: diva_os_leave_spin_lock(&adapter_lock, &old_irql, "write"); diva_os_wakeup_read(e->os_context); break; default: diva_os_leave_spin_lock(&adapter_lock, &old_irql, "write"); break; } break; default: diva_os_leave_spin_lock(&adapter_lock, &old_irql, "write"); return (-1); } DBG_TRC(("A(%d) E(%08x) write=%d", a->adapter_nr, e, ret)); return (ret); } /* -------------------------------------------------------------------------- CALLBACK FROM XDI -------------------------------------------------------------------------- */ static void diva_um_idi_xdi_callback(ENTITY *entity) { divas_um_idi_entity_t *e = DIVAS_CONTAINING_RECORD(entity, divas_um_idi_entity_t, e); diva_os_spin_lock_magic_t old_irql; int call_wakeup = 0; diva_os_enter_spin_lock(&adapter_lock, &old_irql, "xdi_callback"); if (e->e.complete == 255) { if (!(e->status & DIVA_UM_IDI_REMOVE_PENDING)) { diva_um_idi_stop_wdog(e); } if ((call_wakeup = process_idi_rc(e, e->e.Rc))) { if (e->rc_count) { e->rc_count--; } } e->e.Rc = 0; diva_os_leave_spin_lock(&adapter_lock, &old_irql, "xdi_callback"); if (call_wakeup) { diva_os_wakeup_read(e->os_context); diva_os_wakeup_close(e->os_context); } } else { if (e->status & DIVA_UM_IDI_REMOVE_PENDING) { e->e.RNum = 0; e->e.RNR = 2; } else { call_wakeup = process_idi_ind(e, e->e.Ind); } e->e.Ind = 0; diva_os_leave_spin_lock(&adapter_lock, &old_irql, "xdi_callback"); if (call_wakeup) { diva_os_wakeup_read(e->os_context); } } } static int process_idi_request(divas_um_idi_entity_t *e, const diva_um_idi_req_hdr_t *req) { int assign = 0; byte Req = (byte) req->Req; dword type = req->type & DIVA_UM_IDI_REQ_TYPE_MASK; if (!e->e.Id || !e->e.callback) { /* not assigned */ if (Req != ASSIGN) { DBG_ERR(("A: A(%d) E(%08x) not assigned", e->adapter->adapter_nr, e)); return (-1); /* NOT ASSIGNED */ } else { switch (type) { case DIVA_UM_IDI_REQ_TYPE_MAN: e->e.Id = MAN_ID; DBG_TRC(("A(%d) E(%08x) assign MAN", e->adapter->adapter_nr, e)); break; case DIVA_UM_IDI_REQ_TYPE_SIG: e->e.Id = DSIG_ID; DBG_TRC(("A(%d) E(%08x) assign SIG", e->adapter->adapter_nr, e)); break; case DIVA_UM_IDI_REQ_TYPE_NET: e->e.Id = NL_ID; DBG_TRC(("A(%d) E(%08x) assign NET", e->adapter->adapter_nr, e)); break; default: DBG_ERR(("A: A(%d) E(%08x) unknown type=%08x", e->adapter->adapter_nr, e, type)); return (-1); } } e->e.XNum = 1; e->e.RNum = 1; e->e.callback = diva_um_idi_xdi_callback; e->e.X = &e->XData; e->e.R = &e->RData; assign = 1; } e->status |= DIVA_UM_IDI_RC_PENDING; e->e.Req = Req; e->e.ReqCh = (byte) req->ReqCh; e->e.X->PLength = (word) req->data_length; e->e.X->P = (byte *)&req[1]; /* Our buffer is safe */ DBG_TRC(("A(%d) E(%08x) request(%02x-%02x-%02x (%d))", e->adapter->adapter_nr, e, e->e.Id, e->e.Req, e->e.ReqCh, e->e.X->PLength)); e->rc_count++; if (e->adapter && e->adapter->d.request) { diva_um_idi_start_wdog(e); (*(e->adapter->d.request)) (&e->e); } if (assign) { if (e->e.Rc == OUT_OF_RESOURCES) { /* XDI has no entities more, call was not forwarded to the card, no callback will be scheduled */ DBG_ERR(("A: A(%d) E(%08x) XDI out of entities", e->adapter->adapter_nr, e)); e->e.Id = 0; e->e.ReqCh = 0; e->e.RcCh = 0; e->e.Ind = 0; e->e.IndCh = 0; e->e.XNum = 0; e->e.RNum = 0; e->e.callback = NULL; e->e.X = NULL; e->e.R = NULL; write_return_code(e, ASSIGN_RC | OUT_OF_RESOURCES); return (-2); } else { e->status |= DIVA_UM_IDI_ASSIGN_PENDING; } } return (0); } static int process_idi_rc(divas_um_idi_entity_t *e, byte rc) { DBG_TRC(("A(%d) E(%08x) rc(%02x-%02x-%02x)", e->adapter->adapter_nr, e, e->e.Id, rc, e->e.RcCh)); if (e->status & DIVA_UM_IDI_ASSIGN_PENDING) { e->status &= ~DIVA_UM_IDI_ASSIGN_PENDING; if (rc != ASSIGN_OK) { DBG_ERR(("A: A(%d) E(%08x) ASSIGN failed", e->adapter->adapter_nr, e)); e->e.callback = NULL; e->e.Id = 0; e->e.Req = 0; e->e.ReqCh = 0; e->e.Rc = 0; e->e.RcCh = 0; e->e.Ind = 0; e->e.IndCh = 0; e->e.X = NULL; e->e.R = NULL; e->e.XNum = 0; e->e.RNum = 0; } } if ((e->e.Req == REMOVE) && e->e.Id && (rc == 0xff)) { DBG_ERR(("A: A(%d) E(%08x) discard OK in REMOVE", e->adapter->adapter_nr, e)); return (0); /* let us do it in the driver */ } if ((e->e.Req == REMOVE) && (!e->e.Id)) { /* REMOVE COMPLETE */ e->e.callback = NULL; e->e.Id = 0; e->e.Req = 0; e->e.ReqCh = 0; e->e.Rc = 0; e->e.RcCh = 0; e->e.Ind = 0; e->e.IndCh = 0; e->e.X = NULL; e->e.R = NULL; e->e.XNum = 0; e->e.RNum = 0; e->rc_count = 0; } if ((e->e.Req == REMOVE) && (rc != 0xff)) { /* REMOVE FAILED */ DBG_ERR(("A: A(%d) E(%08x) REMOVE FAILED", e->adapter->adapter_nr, e)); } write_return_code(e, rc); return (1); } static int process_idi_ind(divas_um_idi_entity_t *e, byte ind) { int do_wakeup = 0; if (e->e.complete != 0x02) { diva_um_idi_ind_hdr_t *pind = (diva_um_idi_ind_hdr_t *) diva_data_q_get_segment4write(&e->data); if (pind) { e->e.RNum = 1; e->e.R->P = (byte *)&pind[1]; e->e.R->PLength = (word) (diva_data_q_get_max_length(&e->data) - sizeof(*pind)); DBG_TRC(("A(%d) E(%08x) ind_1(%02x-%02x-%02x)-[%d-%d]", e->adapter->adapter_nr, e, e->e.Id, ind, e->e.IndCh, e->e.RLength, e->e.R->PLength)); } else { DBG_TRC(("A(%d) E(%08x) ind(%02x-%02x-%02x)-RNR", e->adapter->adapter_nr, e, e->e.Id, ind, e->e.IndCh)); e->e.RNum = 0; e->e.RNR = 1; do_wakeup = 1; } } else { diva_um_idi_ind_hdr_t *pind = (diva_um_idi_ind_hdr_t *) (e->e.R->P); DBG_TRC(("A(%d) E(%08x) ind(%02x-%02x-%02x)-[%d]", e->adapter->adapter_nr, e, e->e.Id, ind, e->e.IndCh, e->e.R->PLength)); pind--; pind->type = DIVA_UM_IDI_IND; pind->hdr.ind.Ind = ind; pind->hdr.ind.IndCh = e->e.IndCh; pind->data_length = e->e.R->PLength; diva_data_q_ack_segment4write(&e->data, (int) (sizeof(*pind) + e->e.R->PLength)); do_wakeup = 1; } if ((e->status & DIVA_UM_IDI_RC_PENDING) && !e->rc.count) { do_wakeup = 0; } return (do_wakeup); } /* -------------------------------------------------------------------------- Write return code to the return code queue of entity -------------------------------------------------------------------------- */ static int write_return_code(divas_um_idi_entity_t *e, byte rc) { diva_um_idi_ind_hdr_t *prc; if (!(prc = (diva_um_idi_ind_hdr_t *) diva_data_q_get_segment4write(&e->rc))) { DBG_ERR(("A: A(%d) E(%08x) rc(%02x) lost", e->adapter->adapter_nr, e, rc)); e->status &= ~DIVA_UM_IDI_RC_PENDING; return (-1); } prc->type = DIVA_UM_IDI_IND_RC; prc->hdr.rc.Rc = rc; prc->hdr.rc.RcCh = e->e.RcCh; prc->data_length = 0; diva_data_q_ack_segment4write(&e->rc, sizeof(*prc)); return (0); } /* -------------------------------------------------------------------------- Return amount of entries that can be bead from this entity or -1 if adapter was removed -------------------------------------------------------------------------- */ int diva_user_mode_idi_ind_ready(void *entity, void *os_handle) { divas_um_idi_entity_t *e; diva_um_idi_adapter_t *a; diva_os_spin_lock_magic_t old_irql; int ret; if (!entity) return (-1); diva_os_enter_spin_lock(&adapter_lock, &old_irql, "ind_ready"); e = (divas_um_idi_entity_t *) entity; a = e->adapter; if ((!a) || (a->status & DIVA_UM_IDI_ADAPTER_REMOVED)) { /* Adapter was unloaded */ diva_os_leave_spin_lock(&adapter_lock, &old_irql, "ind_ready"); return (-1); /* adapter was removed */ } if (e->status & DIVA_UM_IDI_REMOVED) { /* entity was removed as result of adapter removal user should assign this entity again */ diva_os_leave_spin_lock(&adapter_lock, &old_irql, "ind_ready"); return (-1); } ret = e->rc.count + e->data.count; if ((e->status & DIVA_UM_IDI_RC_PENDING) && !e->rc.count) { ret = 0; } diva_os_leave_spin_lock(&adapter_lock, &old_irql, "ind_ready"); return (ret); } void *diva_um_id_get_os_context(void *entity) { return (((divas_um_idi_entity_t *) entity)->os_context); } int divas_um_idi_entity_assigned(void *entity) { divas_um_idi_entity_t *e; diva_um_idi_adapter_t *a; int ret; diva_os_spin_lock_magic_t old_irql; diva_os_enter_spin_lock(&adapter_lock, &old_irql, "assigned?"); e = (divas_um_idi_entity_t *) entity; if (!e || (!(a = e->adapter)) || (e->status & DIVA_UM_IDI_REMOVED) || (a->status & DIVA_UM_IDI_ADAPTER_REMOVED)) { diva_os_leave_spin_lock(&adapter_lock, &old_irql, "assigned?"); return (0); } e->status |= DIVA_UM_IDI_REMOVE_PENDING; ret = (e->e.Id || e->rc_count || (e->status & DIVA_UM_IDI_ASSIGN_PENDING)); DBG_TRC(("Id:%02x, rc_count:%d, status:%08x", e->e.Id, e->rc_count, e->status)) diva_os_leave_spin_lock(&adapter_lock, &old_irql, "assigned?"); return (ret); } int divas_um_idi_entity_start_remove(void *entity) { divas_um_idi_entity_t *e; diva_um_idi_adapter_t *a; diva_os_spin_lock_magic_t old_irql; diva_os_enter_spin_lock(&adapter_lock, &old_irql, "start_remove"); e = (divas_um_idi_entity_t *) entity; if (!e || (!(a = e->adapter)) || (e->status & DIVA_UM_IDI_REMOVED) || (a->status & DIVA_UM_IDI_ADAPTER_REMOVED)) { diva_os_leave_spin_lock(&adapter_lock, &old_irql, "start_remove"); return (0); } if (e->rc_count) { /* Entity BUSY */ diva_os_leave_spin_lock(&adapter_lock, &old_irql, "start_remove"); return (1); } if (!e->e.Id) { /* Remove request was already pending, and arrived now */ diva_os_leave_spin_lock(&adapter_lock, &old_irql, "start_remove"); return (0); /* REMOVE was pending */ } /* Now send remove request */ e->e.Req = REMOVE; e->e.ReqCh = 0; e->rc_count++; DBG_TRC(("A(%d) E(%08x) request(%02x-%02x-%02x (%d))", e->adapter->adapter_nr, e, e->e.Id, e->e.Req, e->e.ReqCh, e->e.X->PLength)); if (a->d.request) (*(a->d.request)) (&e->e); diva_os_leave_spin_lock(&adapter_lock, &old_irql, "start_remove"); return (0); }
Java
cask 'mpv' do version '0.23.0' sha256 '9c4f5873fc955920c3d570277a2a74f527a9073c27ee1a5eeb3270a1180961e8' # laboratory.stolendata.net/~djinn/mpv_osx was verified as official when first introduced to the cask url "https://laboratory.stolendata.net/~djinn/mpv_osx/mpv-#{version}.tar.gz" appcast 'https://laboratory.stolendata.net/~djinn/mpv_osx/', checkpoint: '00223d39362fa2d8764dd0e98997c6b412b21e5ec12d6bec2f90ffe7df7a4608' name 'mpv' homepage 'https://mpv.io' app 'mpv.app' end
Java
--- title: News --- {% include header.html %} <div class="hmargin" style="float: right"><a class="groups_link" style="color: #fff" href="https://groups.google.com/group/capnproto-announce">Stay Updated</a></div> <h1>News</h1> {% for post in site.posts %} <h2><a href="{{ site.baseurl }}.{{ post.url }}">{{ post.title }}</a></h2> <p class="author"> <a href="https://github.com/{{ post.author }}">{{ post.author }}</a> {% if post.author == 'kentonv' %} <span class="gplus-followbutton"><span class="g-follow" data-annotation="none" data-height="15" data-href="//plus.google.com/118187272963262049674" data-rel="author"></span></span> <a href="https://www.gittip.com/kentonv/"><img class="gittip" src="{{ site.baseurl }}images/gittip.png" alt="Gittip"></a> {% endif %} on <span class="date">{{ post.date | date_to_string }}</span> </p> {{ post.content }} {% endfor %} <script type="text/javascript">setupSidebar()</script> {% include footer.html %}
Java
/* * This software is distributed under BSD 3-clause license (see LICENSE file). * * Authors: Soeren Sonnenburg, Heiko Strathmann, Yuyu Zhang, Viktor Gal, * Thoralf Klein, Fernando Iglesias, Sergey Lisitsyn */ #ifndef __STREAMING_ASCIIFILE_H__ #define __STREAMING_ASCIIFILE_H__ #include <shogun/lib/config.h> #include <shogun/io/streaming/StreamingFile.h> #include <shogun/lib/v_array.h> namespace shogun { struct substring; template <class ST> struct SGSparseVectorEntry; /** @brief Class StreamingAsciiFile to read vector-by-vector from ASCII files. * * The object must be initialized like a CSVFile. */ class StreamingAsciiFile: public StreamingFile { public: /** * Default constructor * */ StreamingAsciiFile(); /** * Constructor taking file name argument * * @param fname file name * @param rw read/write mode */ StreamingAsciiFile(const char* fname, char rw='r'); /** * Destructor */ ~StreamingAsciiFile() override; /** set delimiting character * * @param delimiter the character used as delimiter */ void set_delimiter(char delimiter); #ifndef SWIG // SWIG should skip this /** * Utility function to convert a string to a boolean value * * @param str string to convert * * @return boolean value */ inline bool str_to_bool(char *str) { return (atoi(str)!=0); } #define GET_VECTOR_DECL(sg_type) \ void get_vector \ (sg_type*& vector, int32_t& len) override; \ \ void get_vector_and_label \ (sg_type*& vector, int32_t& len, float64_t& label) override; \ \ void get_string \ (sg_type*& vector, int32_t& len) override; \ \ void get_string_and_label \ (sg_type*& vector, int32_t& len, float64_t& label) override; \ \ void get_sparse_vector \ (SGSparseVectorEntry<sg_type>*& vector, int32_t& len) override; \ \ void get_sparse_vector_and_label \ (SGSparseVectorEntry<sg_type>*& vector, int32_t& len, float64_t& label) override; GET_VECTOR_DECL(bool) GET_VECTOR_DECL(uint8_t) GET_VECTOR_DECL(char) GET_VECTOR_DECL(int32_t) GET_VECTOR_DECL(float32_t) GET_VECTOR_DECL(float64_t) GET_VECTOR_DECL(int16_t) GET_VECTOR_DECL(uint16_t) GET_VECTOR_DECL(int8_t) GET_VECTOR_DECL(uint32_t) GET_VECTOR_DECL(int64_t) GET_VECTOR_DECL(uint64_t) GET_VECTOR_DECL(floatmax_t) #undef GET_VECTOR_DECL #endif // #ifndef SWIG // SWIG should skip this /** @return object name */ const char* get_name() const override { return "StreamingAsciiFile"; } private: /** helper function to read vectors / matrices * * @param items dynamic array of values * @param ptr_data * @param ptr_item */ template <class T> void append_item(std::vector<T>& items, char* ptr_data, char* ptr_item); /** * Split a given substring into an array of substrings * based on a specified delimiter * * @param delim delimiter to use * @param s substring to tokenize * @param ret array of substrings, returned */ void tokenize(char delim, substring s, v_array<substring> &ret); private: /// Helper for parsing v_array<substring> words; /** delimiter */ char m_delimiter; }; } #endif //__STREAMING_ASCIIFILE_H__
Java
#!/bin/bash exec newrelic-admin run-program python manage.py celeryd --maxtasksperchild=${CELERY_MAX_TASKS_PER_CHILD:-100}
Java
#!/usr/bin/env python3 import sys import re import mpmath as mp mp.dps=250 mp.mp.dps = 250 if len(sys.argv) != 2: print("Usage: format_CIAAW.py ciaawfile") quit(1) path = sys.argv[1] atomre = re.compile(r'^(\d+) +(\w\w*) +(\w+) +\[?(\d+)\]?\*? +(.*) *$') isore = re.compile(r'^(\d+)\*? +(\[?\d.*.*\]?) *$') brange = re.compile(r'^\[([\d\.]+),([\d\.]+)\].*$') buncertain = re.compile(r'^([\d\.]+)\((\d+)\)[a-z]*$') bnum = re.compile(r'^([\d\d]+)$') atommassline = re.compile(r'^(\d+) +(\w\w*) +(\w+) +(.*) *$') def NumberStr(n): # Replace spaces s = n.replace(' ', '') # remove "exactly" for the carbon mass s = s.replace('(exactly)', '') # if only a number, put it three times m = bnum.match(s) if m: s = "{:<25} {:<25} {:<25}".format(m.group(1), m.group(1), m.group(1)) # if parentheses uncertainty... m = buncertain.match(s) if m: # tricky. duplicate the first part as a string s2 = m.group(1) # but replace with all zero s2 = re.sub(r'\d', '0', s2) # now replace last characters l = len(m.group(2)) s2 = s2[:len(s2)-l] + m.group(2) # convert to a float serr = mp.mpf(s2) scenter = mp.mpf(m.group(1)) s = "{:<25} {:<25} {:<25}".format(mp.nstr(scenter, 18), mp.nstr(scenter-serr, 18), mp.nstr(scenter+serr, 18)) # Replace bracketed ranges with parentheses m = brange.match(s) if m: slow = mp.mpf(m.group(1)) shigh = mp.mpf(m.group(2)) smid = (shigh + slow)/mp.mpf("2.0") s = "{:<25} {:<25} {:<25}".format(mp.nstr(smid, 18), mp.nstr(slow, 18), mp.nstr(shigh, 18)) # just a dash? if s == "-": s = "{:<25} {:<25} {:<25}".format(0, 0, 0) return s # First 5 lines are comments filelines = [ x.strip() for x in open(path).readlines() ] curatom = None for line in filelines: matomre = atomre.match(line) misore = isore.match(line) matommass = atommassline.match(line) if matomre: curatom = "{:<5} {:<5}".format(matomre.group(1), matomre.group(2)) print("{} {:<6} {:<25}".format(curatom, matomre.group(4), NumberStr(matomre.group(5)))) elif misore: print("{} {:<6} {:<25}".format(curatom, misore.group(1), NumberStr(misore.group(2)))) elif matommass: curatom = "{:<5} {:<5}".format(matommass.group(1), matommass.group(2)) print("{} {:<25}".format(curatom, NumberStr(matommass.group(4)))) else: print(line) # comment lines, etc
Java
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/modules/audio_processing/audio_buffer.h" #include "webrtc/common_audio/include/audio_util.h" #include "webrtc/common_audio/resampler/push_sinc_resampler.h" #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" namespace webrtc { namespace { enum { kSamplesPer8kHzChannel = 80, kSamplesPer16kHzChannel = 160, kSamplesPer32kHzChannel = 320 }; bool HasKeyboardChannel(AudioProcessing::ChannelLayout layout) { switch (layout) { case AudioProcessing::kMono: case AudioProcessing::kStereo: return false; case AudioProcessing::kMonoAndKeyboard: case AudioProcessing::kStereoAndKeyboard: return true; } assert(false); return false; } int KeyboardChannelIndex(AudioProcessing::ChannelLayout layout) { switch (layout) { case AudioProcessing::kMono: case AudioProcessing::kStereo: assert(false); return -1; case AudioProcessing::kMonoAndKeyboard: return 1; case AudioProcessing::kStereoAndKeyboard: return 2; } assert(false); return -1; } void StereoToMono(const float* left, const float* right, float* out, int samples_per_channel) { for (int i = 0; i < samples_per_channel; ++i) { out[i] = (left[i] + right[i]) / 2; } } void StereoToMono(const int16_t* left, const int16_t* right, int16_t* out, int samples_per_channel) { for (int i = 0; i < samples_per_channel; ++i) { out[i] = (left[i] + right[i]) >> 1; } } } // namespace // One int16_t and one float ChannelBuffer that are kept in sync. The sync is // broken when someone requests write access to either ChannelBuffer, and // reestablished when someone requests the outdated ChannelBuffer. It is // therefore safe to use the return value of ibuf_const() and fbuf_const() // until the next call to ibuf() or fbuf(), and the return value of ibuf() and // fbuf() until the next call to any of the other functions. class IFChannelBuffer { public: IFChannelBuffer(int samples_per_channel, int num_channels) : ivalid_(true), ibuf_(samples_per_channel, num_channels), fvalid_(true), fbuf_(samples_per_channel, num_channels) {} ChannelBuffer<int16_t>* ibuf() { return ibuf(false); } ChannelBuffer<float>* fbuf() { return fbuf(false); } const ChannelBuffer<int16_t>* ibuf_const() { return ibuf(true); } const ChannelBuffer<float>* fbuf_const() { return fbuf(true); } private: ChannelBuffer<int16_t>* ibuf(bool readonly) { RefreshI(); fvalid_ = readonly; return &ibuf_; } ChannelBuffer<float>* fbuf(bool readonly) { RefreshF(); ivalid_ = readonly; return &fbuf_; } void RefreshF() { if (!fvalid_) { assert(ivalid_); const int16_t* const int_data = ibuf_.data(); float* const float_data = fbuf_.data(); const int length = fbuf_.length(); for (int i = 0; i < length; ++i) float_data[i] = int_data[i]; fvalid_ = true; } } void RefreshI() { if (!ivalid_) { assert(fvalid_); const float* const float_data = fbuf_.data(); int16_t* const int_data = ibuf_.data(); const int length = ibuf_.length(); for (int i = 0; i < length; ++i) int_data[i] = WEBRTC_SPL_SAT(std::numeric_limits<int16_t>::max(), float_data[i], std::numeric_limits<int16_t>::min()); ivalid_ = true; } } bool ivalid_; ChannelBuffer<int16_t> ibuf_; bool fvalid_; ChannelBuffer<float> fbuf_; }; AudioBuffer::AudioBuffer(int input_samples_per_channel, int num_input_channels, int process_samples_per_channel, int num_process_channels, int output_samples_per_channel) : input_samples_per_channel_(input_samples_per_channel), num_input_channels_(num_input_channels), proc_samples_per_channel_(process_samples_per_channel), num_proc_channels_(num_process_channels), output_samples_per_channel_(output_samples_per_channel), samples_per_split_channel_(proc_samples_per_channel_), mixed_low_pass_valid_(false), reference_copied_(false), activity_(AudioFrame::kVadUnknown), keyboard_data_(NULL), channels_(new IFChannelBuffer(proc_samples_per_channel_, num_proc_channels_)) { assert(input_samples_per_channel_ > 0); assert(proc_samples_per_channel_ > 0); assert(output_samples_per_channel_ > 0); assert(num_input_channels_ > 0 && num_input_channels_ <= 2); assert(num_proc_channels_ <= num_input_channels); if (num_input_channels_ == 2 && num_proc_channels_ == 1) { input_buffer_.reset(new ChannelBuffer<float>(input_samples_per_channel_, num_proc_channels_)); } if (input_samples_per_channel_ != proc_samples_per_channel_ || output_samples_per_channel_ != proc_samples_per_channel_) { // Create an intermediate buffer for resampling. process_buffer_.reset(new ChannelBuffer<float>(proc_samples_per_channel_, num_proc_channels_)); } if (input_samples_per_channel_ != proc_samples_per_channel_) { input_resamplers_.reserve(num_proc_channels_); for (int i = 0; i < num_proc_channels_; ++i) { input_resamplers_.push_back( new PushSincResampler(input_samples_per_channel_, proc_samples_per_channel_)); } } if (output_samples_per_channel_ != proc_samples_per_channel_) { output_resamplers_.reserve(num_proc_channels_); for (int i = 0; i < num_proc_channels_; ++i) { output_resamplers_.push_back( new PushSincResampler(proc_samples_per_channel_, output_samples_per_channel_)); } } if (proc_samples_per_channel_ == kSamplesPer32kHzChannel) { samples_per_split_channel_ = kSamplesPer16kHzChannel; split_channels_low_.reset(new IFChannelBuffer(samples_per_split_channel_, num_proc_channels_)); split_channels_high_.reset(new IFChannelBuffer(samples_per_split_channel_, num_proc_channels_)); filter_states_.reset(new SplitFilterStates[num_proc_channels_]); } } AudioBuffer::~AudioBuffer() {} void AudioBuffer::CopyFrom(const float* const* data, int samples_per_channel, AudioProcessing::ChannelLayout layout) { assert(samples_per_channel == input_samples_per_channel_); assert(ChannelsFromLayout(layout) == num_input_channels_); InitForNewData(); if (HasKeyboardChannel(layout)) { keyboard_data_ = data[KeyboardChannelIndex(layout)]; } // Downmix. const float* const* data_ptr = data; if (num_input_channels_ == 2 && num_proc_channels_ == 1) { StereoToMono(data[0], data[1], input_buffer_->channel(0), input_samples_per_channel_); data_ptr = input_buffer_->channels(); } // Resample. if (input_samples_per_channel_ != proc_samples_per_channel_) { for (int i = 0; i < num_proc_channels_; ++i) { input_resamplers_[i]->Resample(data_ptr[i], input_samples_per_channel_, process_buffer_->channel(i), proc_samples_per_channel_); } data_ptr = process_buffer_->channels(); } // Convert to int16. for (int i = 0; i < num_proc_channels_; ++i) { ScaleAndRoundToInt16(data_ptr[i], proc_samples_per_channel_, channels_->ibuf()->channel(i)); } } void AudioBuffer::CopyTo(int samples_per_channel, AudioProcessing::ChannelLayout layout, float* const* data) { assert(samples_per_channel == output_samples_per_channel_); assert(ChannelsFromLayout(layout) == num_proc_channels_); // Convert to float. float* const* data_ptr = data; if (output_samples_per_channel_ != proc_samples_per_channel_) { // Convert to an intermediate buffer for subsequent resampling. data_ptr = process_buffer_->channels(); } for (int i = 0; i < num_proc_channels_; ++i) { ScaleToFloat(channels_->ibuf()->channel(i), proc_samples_per_channel_, data_ptr[i]); } // Resample. if (output_samples_per_channel_ != proc_samples_per_channel_) { for (int i = 0; i < num_proc_channels_; ++i) { output_resamplers_[i]->Resample(data_ptr[i], proc_samples_per_channel_, data[i], output_samples_per_channel_); } } } void AudioBuffer::InitForNewData() { keyboard_data_ = NULL; mixed_low_pass_valid_ = false; reference_copied_ = false; activity_ = AudioFrame::kVadUnknown; } const int16_t* AudioBuffer::data(int channel) const { return channels_->ibuf_const()->channel(channel); } int16_t* AudioBuffer::data(int channel) { mixed_low_pass_valid_ = false; return channels_->ibuf()->channel(channel); } const float* AudioBuffer::data_f(int channel) const { return channels_->fbuf_const()->channel(channel); } float* AudioBuffer::data_f(int channel) { mixed_low_pass_valid_ = false; return channels_->fbuf()->channel(channel); } const int16_t* AudioBuffer::low_pass_split_data(int channel) const { return split_channels_low_.get() ? split_channels_low_->ibuf_const()->channel(channel) : data(channel); } int16_t* AudioBuffer::low_pass_split_data(int channel) { mixed_low_pass_valid_ = false; return split_channels_low_.get() ? split_channels_low_->ibuf()->channel(channel) : data(channel); } const float* AudioBuffer::low_pass_split_data_f(int channel) const { return split_channels_low_.get() ? split_channels_low_->fbuf_const()->channel(channel) : data_f(channel); } float* AudioBuffer::low_pass_split_data_f(int channel) { mixed_low_pass_valid_ = false; return split_channels_low_.get() ? split_channels_low_->fbuf()->channel(channel) : data_f(channel); } const int16_t* AudioBuffer::high_pass_split_data(int channel) const { return split_channels_high_.get() ? split_channels_high_->ibuf_const()->channel(channel) : NULL; } int16_t* AudioBuffer::high_pass_split_data(int channel) { return split_channels_high_.get() ? split_channels_high_->ibuf()->channel(channel) : NULL; } const float* AudioBuffer::high_pass_split_data_f(int channel) const { return split_channels_high_.get() ? split_channels_high_->fbuf_const()->channel(channel) : NULL; } float* AudioBuffer::high_pass_split_data_f(int channel) { return split_channels_high_.get() ? split_channels_high_->fbuf()->channel(channel) : NULL; } const int16_t* AudioBuffer::mixed_low_pass_data() { // Currently only mixing stereo to mono is supported. assert(num_proc_channels_ == 1 || num_proc_channels_ == 2); if (num_proc_channels_ == 1) { return low_pass_split_data(0); } if (!mixed_low_pass_valid_) { if (!mixed_low_pass_channels_.get()) { mixed_low_pass_channels_.reset( new ChannelBuffer<int16_t>(samples_per_split_channel_, 1)); } StereoToMono(low_pass_split_data(0), low_pass_split_data(1), mixed_low_pass_channels_->data(), samples_per_split_channel_); mixed_low_pass_valid_ = true; } return mixed_low_pass_channels_->data(); } const int16_t* AudioBuffer::low_pass_reference(int channel) const { if (!reference_copied_) { return NULL; } return low_pass_reference_channels_->channel(channel); } const float* AudioBuffer::keyboard_data() const { return keyboard_data_; } SplitFilterStates* AudioBuffer::filter_states(int channel) { assert(channel >= 0 && channel < num_proc_channels_); return &filter_states_[channel]; } void AudioBuffer::set_activity(AudioFrame::VADActivity activity) { activity_ = activity; } AudioFrame::VADActivity AudioBuffer::activity() const { return activity_; } int AudioBuffer::num_channels() const { return num_proc_channels_; } int AudioBuffer::samples_per_channel() const { return proc_samples_per_channel_; } int AudioBuffer::samples_per_split_channel() const { return samples_per_split_channel_; } int AudioBuffer::samples_per_keyboard_channel() const { // We don't resample the keyboard channel. return input_samples_per_channel_; } // TODO(andrew): Do deinterleaving and mixing in one step? void AudioBuffer::DeinterleaveFrom(AudioFrame* frame) { assert(proc_samples_per_channel_ == input_samples_per_channel_); assert(num_proc_channels_ == num_input_channels_); assert(frame->num_channels_ == num_proc_channels_); assert(frame->samples_per_channel_ == proc_samples_per_channel_); InitForNewData(); activity_ = frame->vad_activity_; int16_t* interleaved = frame->data_; for (int i = 0; i < num_proc_channels_; i++) { int16_t* deinterleaved = channels_->ibuf()->channel(i); int interleaved_idx = i; for (int j = 0; j < proc_samples_per_channel_; j++) { deinterleaved[j] = interleaved[interleaved_idx]; interleaved_idx += num_proc_channels_; } } } void AudioBuffer::InterleaveTo(AudioFrame* frame, bool data_changed) const { assert(proc_samples_per_channel_ == output_samples_per_channel_); assert(num_proc_channels_ == num_input_channels_); assert(frame->num_channels_ == num_proc_channels_); assert(frame->samples_per_channel_ == proc_samples_per_channel_); frame->vad_activity_ = activity_; if (!data_changed) { return; } int16_t* interleaved = frame->data_; for (int i = 0; i < num_proc_channels_; i++) { int16_t* deinterleaved = channels_->ibuf()->channel(i); int interleaved_idx = i; for (int j = 0; j < proc_samples_per_channel_; j++) { interleaved[interleaved_idx] = deinterleaved[j]; interleaved_idx += num_proc_channels_; } } } void AudioBuffer::CopyLowPassToReference() { reference_copied_ = true; if (!low_pass_reference_channels_.get()) { low_pass_reference_channels_.reset( new ChannelBuffer<int16_t>(samples_per_split_channel_, num_proc_channels_)); } for (int i = 0; i < num_proc_channels_; i++) { low_pass_reference_channels_->CopyFrom(low_pass_split_data(i), i); } } } // namespace webrtc
Java
<?php namespace common\models; use common\modules\i18n\Module; /** * This is the model class for table "magazine_item". * * @property integer $id * @property integer $magazine_id * @property string $image * @property integer $sort * * @property Magazine $magazine */ class MagazineItem extends Bean { /** * Variable for file storing while data saving * @var mixed */ public $file; /** * @inheritdoc */ public static function tableName() { return 'magazine_item'; } /** * @inheritdoc */ public function rules() { return [ [['magazine_id', 'image'], 'required'], [['magazine_id', 'sort'], 'integer'], [['image'], 'string', 'max' => 255], [['magazine_id'], 'exist', 'skipOnError' => true, 'targetClass' => Magazine::className(), 'targetAttribute' => ['magazine_id' => 'id']], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => Module::t('Id'), 'magazine_id' => Module::t('Magazine'), 'image' => Module::t('Image'), ]; } /** * @return \yii\db\ActiveQuery */ public function getMagazine() { return $this->hasOne(Magazine::className(), ['id' => 'magazine_id']); } }
Java
import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_equal, set_random_state, assert_raise_message) from sklearn.tree import DecisionTreeClassifier from sklearn.lda import LDA try: from nose.tools import assert_less def test_assert_less(): # Check that the nose implementation of assert_less gives the # same thing as the scikit's assert_less(0, 1) _assert_less(0, 1) assert_raises(AssertionError, assert_less, 1, 0) assert_raises(AssertionError, _assert_less, 1, 0) except ImportError: pass try: from nose.tools import assert_greater def test_assert_greater(): # Check that the nose implementation of assert_less gives the # same thing as the scikit's assert_greater(1, 0) _assert_greater(1, 0) assert_raises(AssertionError, assert_greater, 0, 1) assert_raises(AssertionError, _assert_greater, 0, 1) except ImportError: pass def test_assert_less_equal(): assert_less_equal(0, 1) assert_less_equal(1, 1) assert_raises(AssertionError, assert_less_equal, 1, 0) def test_assert_greater_equal(): assert_greater_equal(1, 0) assert_greater_equal(1, 1) assert_raises(AssertionError, assert_greater_equal, 0, 1) def test_set_random_state(): lda = LDA() tree = DecisionTreeClassifier() # LDA doesn't have random state: smoke test set_random_state(lda, 3) set_random_state(tree, 3) assert_equal(tree.random_state, 3) def test_assert_raise_message(): def _raise_ValueError(message): raise ValueError(message) assert_raise_message(ValueError, "test", _raise_ValueError, "test") assert_raises(AssertionError, assert_raise_message, ValueError, "something else", _raise_ValueError, "test") assert_raises(ValueError, assert_raise_message, TypeError, "something else", _raise_ValueError, "test") # This class is inspired from numpy 1.7 with an alteration to check # the reset warning filters after calls to assert_warns. # This assert_warns behavior is specific to scikit-learn because #`clean_warning_registry()` is called internally by assert_warns # and clears all previous filters. class TestWarns(unittest.TestCase): def test_warn(self): def f(): warnings.warn("yo") return 3 # Test that assert_warns is not impacted by externally set # filters and is reset internally. # This is because `clean_warning_registry()` is called internally by # assert_warns and clears all previous filters. warnings.simplefilter("ignore", UserWarning) assert_equal(assert_warns(UserWarning, f), 3) # Test that the warning registry is empty after assert_warns assert_equal(sys.modules['warnings'].filters, []) assert_raises(AssertionError, assert_no_warnings, f) assert_equal(assert_no_warnings(lambda x: x, 1), 1) def test_warn_wrong_warning(self): def f(): warnings.warn("yo", DeprecationWarning) failed = False filters = sys.modules['warnings'].filters[:] try: try: # Should raise an AssertionError assert_warns(UserWarning, f) failed = True except AssertionError: pass finally: sys.modules['warnings'].filters = filters if failed: raise AssertionError("wrong warning caught by assert_warn")
Java
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "media/filters/reference_audio_renderer.h" #include <math.h> #include "base/bind.h" #include "base/synchronization/waitable_event.h" namespace media { ReferenceAudioRenderer::ReferenceAudioRenderer(AudioManager* audio_manager) : AudioRendererBase(), audio_manager_(audio_manager), bytes_per_second_(0), has_buffered_data_(true), buffer_capacity_(0) { } ReferenceAudioRenderer::~ReferenceAudioRenderer() { // Close down the audio device. if (controller_) { base::WaitableEvent closed_event(true, false); controller_->Close(base::Bind(&base::WaitableEvent::Signal, base::Unretained(&closed_event))); closed_event.Wait(); } } void ReferenceAudioRenderer::SetPlaybackRate(float rate) { // TODO(fbarchard): limit rate to reasonable values AudioRendererBase::SetPlaybackRate(rate); if (controller_ && rate > 0.0f) controller_->Play(); } void ReferenceAudioRenderer::SetVolume(float volume) { if (controller_) controller_->SetVolume(volume); } void ReferenceAudioRenderer::OnCreated(AudioOutputController* controller) { NOTIMPLEMENTED(); } void ReferenceAudioRenderer::OnPlaying(AudioOutputController* controller) { NOTIMPLEMENTED(); } void ReferenceAudioRenderer::OnPaused(AudioOutputController* controller) { NOTIMPLEMENTED(); } void ReferenceAudioRenderer::OnError(AudioOutputController* controller, int error_code) { NOTIMPLEMENTED(); } void ReferenceAudioRenderer::OnMoreData(AudioOutputController* controller, AudioBuffersState buffers_state) { // TODO(fbarchard): Waveout_output_win.h should handle zero length buffers // without clicking. uint32 pending_bytes = static_cast<uint32>(ceil(buffers_state.total_bytes() * GetPlaybackRate())); base::TimeDelta delay = base::TimeDelta::FromMicroseconds( base::Time::kMicrosecondsPerSecond * pending_bytes / bytes_per_second_); has_buffered_data_ = buffers_state.pending_bytes != 0; uint32 read = FillBuffer(buffer_.get(), buffer_capacity_, delay); controller->EnqueueData(buffer_.get(), read); } void ReferenceAudioRenderer::OnRenderEndOfStream() { // We cannot signal end of stream as long as we have buffered data. // In such case eventually host would playback all the data, and OnMoreData() // would be called with buffers_state.pending_bytes == 0. At that moment // we'll call SignalEndOfStream(); if (!has_buffered_data_) SignalEndOfStream(); } bool ReferenceAudioRenderer::OnInitialize(int bits_per_channel, ChannelLayout channel_layout, int sample_rate) { int samples_per_packet = sample_rate / 10; int hardware_buffer_size = samples_per_packet * ChannelLayoutToChannelCount(channel_layout) * bits_per_channel / 8; // Allocate audio buffer based on hardware buffer size. buffer_capacity_ = 3 * hardware_buffer_size; buffer_.reset(new uint8[buffer_capacity_]); AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, channel_layout, sample_rate, bits_per_channel, samples_per_packet); bytes_per_second_ = params.GetBytesPerSecond(); controller_ = AudioOutputController::Create(audio_manager_, this, params, buffer_capacity_); return controller_ != NULL; } void ReferenceAudioRenderer::OnStop() { if (controller_) controller_->Pause(); } } // namespace media
Java
<?php namespace ValuSoTest\TestAsset; use ValuSo\Annotation; /** * @Annotation\Exclude */ abstract class AbstractExcludedService { public function excluded() { return true; } }
Java
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="tr"> <context> <name>BMMDialog</name> <message> <location filename="../BMMDialog.ui" line="14"/> <source>Manage Bookmarks</source> <translation>Yer İmlerini Yönet</translation> </message> <message> <location filename="../BMMDialog.ui" line="35"/> <source>Name</source> <translation>Ad</translation> </message> <message> <location filename="../BMMDialog.ui" line="40"/> <source>Path</source> <translation>Yol</translation> </message> <message> <location filename="../BMMDialog.ui" line="52"/> <source>Remove Bookmark</source> <translation>Yer İmini Kaldır</translation> </message> <message> <location filename="../BMMDialog.ui" line="65"/> <source>Rename BookMark</source> <translation>Yer İmini Yeniden Adlandır</translation> </message> <message> <location filename="../BMMDialog.ui" line="91"/> <source>Finished</source> <translation>Bitti</translation> </message> <message> <location filename="../BMMDialog.cpp" line="58"/> <source>Rename Bookmark</source> <translation>Yer İmini Yeniden Adlandır</translation> </message> <message> <location filename="../BMMDialog.cpp" line="58"/> <source>Name:</source> <translation>Ad:</translation> </message> <message> <location filename="../BMMDialog.cpp" line="64"/> <source>Invalid Name</source> <translation>Geçersiz Ad</translation> </message> <message> <location filename="../BMMDialog.cpp" line="64"/> <source>This bookmark name already exists. Please choose another.</source> <translation>Bu yer imi adı zaten mevcut. Lütfen başka bir ad seçin.</translation> </message> </context> <context> <name>BrowserWidget</name> <message> <location filename="../BrowserWidget.cpp" line="257"/> <source>Name</source> <translation type="unfinished">Ad</translation> </message> <message> <location filename="../BrowserWidget.cpp" line="258"/> <source>Size</source> <translation type="unfinished">Boyut</translation> </message> <message> <location filename="../BrowserWidget.cpp" line="259"/> <source>Type</source> <translation type="unfinished">Tür</translation> </message> <message> <location filename="../BrowserWidget.cpp" line="260"/> <source>Date Modified</source> <translation type="unfinished">Değiştirilme Tarihi</translation> </message> <message> <location filename="../BrowserWidget.cpp" line="261"/> <source>Date Created</source> <translation type="unfinished">Oluşturulma Tarihi</translation> </message> <message> <location filename="../BrowserWidget.cpp" line="438"/> <source>Capacity: %1</source> <translation type="unfinished">Kapasite: %1</translation> </message> <message> <location filename="../BrowserWidget.cpp" line="463"/> <source>Files: %1 (%2)</source> <translation type="unfinished">Dosyalar: %1 (%2)</translation> </message> <message> <location filename="../BrowserWidget.cpp" line="465"/> <source>Files: %1</source> <translation type="unfinished"></translation> </message> <message> <location filename="../BrowserWidget.cpp" line="471"/> <source>Dirs: %1</source> <translation type="unfinished">Dizinler: %1</translation> </message> <message> <location filename="../BrowserWidget.cpp" line="427"/> <source>No Directory Contents</source> <translation type="unfinished"></translation> </message> </context> <context> <name>DirWidget</name> <message> <location filename="../widgets/DirWidget2.ui" line="20"/> <source>Form</source> <translation>Form</translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="41"/> <source> * - FILE MANAGER RUNNING AS ROOT- * </source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="182"/> <source>Increase Icon Sizes</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="204"/> <source>Decrease Icon Sizes</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="228"/> <source>Back</source> <translation>Geri</translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="231"/> <location filename="../widgets/DirWidget2.ui" line="234"/> <source>Go back to previous directory</source> <translation>Önceki dizine geri git</translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="242"/> <source>Up</source> <translation>Yukarı</translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="245"/> <location filename="../widgets/DirWidget2.ui" line="248"/> <source>Go to parent directory</source> <translation>Üst dizine git</translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="256"/> <source>Home</source> <translation>Ev</translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="259"/> <location filename="../widgets/DirWidget2.ui" line="262"/> <source>Go to home directory</source> <translation>Ev dizinine git</translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="267"/> <source>Menu</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="270"/> <source>Select Action</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="278"/> <source>Single Column</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="281"/> <source>Single column view</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="289"/> <source>Dual Column</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.ui" line="292"/> <source>Dual Column View</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="691"/> <source>(Limited Access) </source> <translation>(Sınırlı Erişim) </translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="713"/> <location filename="../widgets/DirWidget2.cpp" line="761"/> <source>New Document</source> <translation>Yeni Belge</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="713"/> <location filename="../widgets/DirWidget2.cpp" line="738"/> <location filename="../widgets/DirWidget2.cpp" line="761"/> <source>Name:</source> <translation>Ad:</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="730"/> <source>Error Creating Document</source> <translation>Belge Oluşturmada Hata</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="730"/> <source>The document could not be created. Please ensure that you have the proper permissions.</source> <translation>Belge oluşturulamadı. Lütfen uygun izinlere sahip olduğunuza emin olun.</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="738"/> <source>New Directory</source> <translation>Yeni Dizin</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="721"/> <location filename="../widgets/DirWidget2.cpp" line="748"/> <location filename="../widgets/DirWidget2.cpp" line="770"/> <source>Invalid Name</source> <translation>Geçersiz Ad</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="289"/> <source>Open Current Dir in a Terminal</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="570"/> <source>File Operations</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="607"/> <source>Directory Operations</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="655"/> <source>Other...</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="663"/> <source>Loading...</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="721"/> <location filename="../widgets/DirWidget2.cpp" line="748"/> <location filename="../widgets/DirWidget2.cpp" line="770"/> <source>A file or directory with that name already exists! Please pick a different name.</source> <translation>Aynı adda bir dosya ya da dizin zaten mevcut! Lütfen farklı bir ad seçin.</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="752"/> <source>Error Creating Directory</source> <translation>Dizin Oluşturmada Hata</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="752"/> <source>The directory could not be created. Please ensure that you have the proper permissions to modify the current directory.</source> <translation>Dizin oluşturulamadı. Lütfen geçerli dizinde değişiklik yapmak için uygun izinlere sahip olduğunuza emin olun.</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="384"/> <source>Current</source> <translation>Geçerli</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="279"/> <source>Create...</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="281"/> <source>File</source> <translation type="unfinished">Dosya</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="282"/> <source>Directory</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="283"/> <source>Application Launcher</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="287"/> <source>Launch...</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="290"/> <source>SlideShow</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="291"/> <source>Multimedia Player</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="293"/> <source>Open Current Dir as Root</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="297"/> <source>Archive Options</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="320"/> <source>Open with...</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="326"/> <source>View Files...</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="328"/> <source>Checksums</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="330"/> <source>Properties</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="520"/> <source>File Checksums:</source> <translation>Dosya Sağlama Toplamları:</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="532"/> <source>Missing Utility</source> <translation>Eksik Gereç</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="532"/> <source>The &quot;lumina-fileinfo&quot; utility could not be found on the system. Please install it first.</source> <translation>Sistemde &quot;lumina-fileinfo&quot; gereci bulunamadı. Lütfen önce gereci yükleyin.</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="558"/> <source>Open</source> <translation>Aç</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="567"/> <source>Set as Wallpaper</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="575"/> <source>Rename...</source> <translation>Yeniden adlandır...</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="576"/> <source>Cut Selection</source> <translation>Seçimi Kes</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="577"/> <source>Copy Selection</source> <translation>Seçimi Kopyala</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="580"/> <source>Paste</source> <translation>Yapıştır</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="584"/> <source>Delete Selection</source> <translation>Seçimi Sil</translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="597"/> <source>Extract Here</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="599"/> <source>Archive Selection</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="907"/> <source>Select Archive</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="921"/> <source>Set Wallpaper on Screen</source> <translation type="unfinished"></translation> </message> <message> <location filename="../widgets/DirWidget2.cpp" line="921"/> <source>Screen</source> <translation type="unfinished"></translation> </message> </context> <context> <name>FODialog</name> <message> <location filename="../FODialog.ui" line="14"/> <source>Performing File Operations</source> <translation>Dosya İşlemleri Gerçekleştiriliyor</translation> </message> <message> <location filename="../FODialog.ui" line="39"/> <source>%v/%m</source> <translation>%v/%m</translation> </message> <message> <location filename="../FODialog.ui" line="74"/> <source>Stop</source> <translation>Dur</translation> </message> <message> <location filename="../FODialog.cpp" line="19"/> <source>Calculating</source> <translation>Hesaplanıyor</translation> </message> <message> <location filename="../FODialog.cpp" line="131"/> <source>Overwrite Files?</source> <translation>Dosyaların üzerine yazılsın mı?</translation> </message> <message> <location filename="../FODialog.cpp" line="131"/> <source>Do you want to overwrite the existing files?</source> <translation>Mevcut dosyaların üzerine yazmak istiyor musunuz?</translation> </message> <message> <location filename="../FODialog.cpp" line="131"/> <source>Note: It will just add a number to the filename otherwise.</source> <translation>Not: Aksi durumda dosya adına bir sayı eklenecek.</translation> </message> <message> <location filename="../FODialog.cpp" line="133"/> <source>YesToAll</source> <translation type="unfinished"></translation> </message> <message> <location filename="../FODialog.cpp" line="134"/> <source>NoToAll</source> <translation type="unfinished"></translation> </message> <message> <location filename="../FODialog.cpp" line="135"/> <source>Cancel</source> <translation type="unfinished"></translation> </message> <message> <location filename="../FODialog.cpp" line="154"/> <source>Removing: %1</source> <translation>Kaldırılıyor: %1</translation> </message> <message> <location filename="../FODialog.cpp" line="155"/> <source>Copying: %1 to %2</source> <translation>Kopyalanıyor: %1 %2 hedefine</translation> </message> <message> <location filename="../FODialog.cpp" line="156"/> <source>Restoring: %1 as %2</source> <translation>Geri yükleniyor: %1 %2 olarak</translation> </message> <message> <location filename="../FODialog.cpp" line="157"/> <source>Moving: %1 to %2</source> <translation>Taşınıyor: %1 %2 hedefine</translation> </message> <message> <location filename="../FODialog.cpp" line="170"/> <source>Could not remove these files:</source> <translation>Bu dosyalar kaldırılamadı:</translation> </message> <message> <location filename="../FODialog.cpp" line="171"/> <source>Could not copy these files:</source> <translation>Bu dosyalar kopyalanamadı:</translation> </message> <message> <location filename="../FODialog.cpp" line="172"/> <source>Could not restore these files:</source> <translation>Bu dosyalar geri yüklenemedi:</translation> </message> <message> <location filename="../FODialog.cpp" line="173"/> <source>Could not move these files:</source> <translation>Bu dosyalar taşınamadı:</translation> </message> <message> <location filename="../FODialog.cpp" line="175"/> <source>File Errors</source> <translation>Dosya Hataları</translation> </message> </context> <context> <name>FOWorker</name> <message> <location filename="../FODialog.cpp" line="326"/> <source>Invalid Move</source> <translation>Geçersiz Taşıma</translation> </message> <message> <location filename="../FODialog.cpp" line="326"/> <source>It is not possible to move a directory into itself. Please make a copy of the directory instead. Old Location: %1 New Location: %2</source> <translation>Bir dizini kendi içine taşımak mümkün değil. Bunun yerine lütfen dizinin bir kopyasını alın. Eski Konum: %1 Yeni Konum: %2</translation> </message> </context> <context> <name>GitWizard</name> <message> <location filename="../gitWizard.ui" line="14"/> <source>Clone a Git Repository</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="24"/> <source>Welcome!</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="27"/> <source>This wizard will guide you through the process of downloading a GIT repository from the internet.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="46"/> <source>GitHub Repository Settings</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="55"/> <source>Organization/User</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="65"/> <source>Repository Name</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="75"/> <source>Is Private Repository</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="89"/> <source>Type of Access</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="95"/> <source>Use my SSH Key</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="105"/> <source>Login to server</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="114"/> <source>Username</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="124"/> <source>Password</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="133"/> <source>Anonymous (public repositories only)</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="143"/> <source>Optional SSH Password</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="153"/> <source>Advanced Options</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="159"/> <source>Custom Depth</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="166"/> <source>Single Branch</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="175"/> <source>branch name</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.ui" line="232"/> <source>Click &quot;Next&quot; to start downloading the repository</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.h" line="58"/> <source>Stop Download?</source> <translation type="unfinished"></translation> </message> <message> <location filename="../gitWizard.h" line="58"/> <source>Kill the current download?</source> <translation type="unfinished"></translation> </message> </context> <context> <name>MainUI</name> <message> <location filename="../MainUI.ui" line="14"/> <source>Insight</source> <translation>Görü</translation> </message> <message> <location filename="../MainUI.cpp" line="98"/> <source>Shift+Left</source> <translation>Shift+Sol</translation> </message> <message> <location filename="../MainUI.cpp" line="99"/> <source>Shift+Right</source> <translation>Shift+Sağ</translation> </message> <message> <location filename="../MainUI.ui" line="142"/> <source>View Mode</source> <translation>Görünüm Modu</translation> </message> <message> <location filename="../MainUI.ui" line="184"/> <source>New Tab</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="187"/> <source>New Browser</source> <translation>Yeni Gözatıcı</translation> </message> <message> <location filename="../MainUI.ui" line="258"/> <source>Show Image Previews</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="263"/> <source>Search Directory...</source> <translation>Dizinde Ara...</translation> </message> <message> <location filename="../MainUI.ui" line="296"/> <source>Increase Icon Size</source> <translation>Simge Boyutunu Arttır</translation> </message> <message> <location filename="../MainUI.ui" line="301"/> <source>Decrease Icon Size</source> <translation>Simge Boyutunu Azalt</translation> </message> <message> <location filename="../MainUI.ui" line="306"/> <source>Larger Icons</source> <translation>Daha Büyük Simgeler</translation> </message> <message> <location filename="../MainUI.ui" line="309"/> <source>Ctrl++</source> <translation>Ctrl++</translation> </message> <message> <location filename="../MainUI.ui" line="317"/> <source>Smaller Icons</source> <translation>Daha Küçük Simgeler</translation> </message> <message> <location filename="../MainUI.ui" line="320"/> <source>Ctrl+-</source> <translation>Ctrl+-</translation> </message> <message> <location filename="../MainUI.ui" line="328"/> <source>New Window</source> <translation>Yeni Pencere</translation> </message> <message> <location filename="../MainUI.ui" line="331"/> <source>Ctrl+N</source> <translation>Ctrl+N</translation> </message> <message> <location filename="../MainUI.ui" line="339"/> <source>Add Bookmark</source> <translation>Yer İmi Ekle</translation> </message> <message> <location filename="../MainUI.ui" line="342"/> <source>Ctrl+D</source> <translation>Ctrl+D</translation> </message> <message> <location filename="../MainUI.ui" line="394"/> <source>Delete Selection</source> <translation>Seçimi Sil</translation> </message> <message> <location filename="../MainUI.ui" line="397"/> <source>Del</source> <translation>Sil</translation> </message> <message> <location filename="../MainUI.ui" line="405"/> <source>Refresh</source> <translation>Yenile</translation> </message> <message> <location filename="../MainUI.ui" line="416"/> <source>Close Tab</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="427"/> <source>Repo Status</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="432"/> <source>Clone Repository</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="440"/> <source>Show Directory Tree Window</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="443"/> <source>Show Directory Tree Pane</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="446"/> <source>Ctrl+P</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="451"/> <source>Open as Root</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="190"/> <source>Ctrl+T</source> <translation>Ctrl+T</translation> </message> <message> <location filename="../MainUI.ui" line="124"/> <source>&amp;File</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="138"/> <source>&amp;View</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="155"/> <source>&amp;Bookmarks</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="163"/> <source>&amp;External Devices</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="170"/> <source>&amp;Git</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.ui" line="198"/> <source>Exit</source> <translation>Çık</translation> </message> <message> <location filename="../MainUI.ui" line="201"/> <source>Ctrl+Q</source> <translation>Ctrl+Q</translation> </message> <message> <location filename="../MainUI.ui" line="209"/> <source>&amp;Preferences</source> <translation>&amp;Tercihler</translation> </message> <message> <location filename="../MainUI.ui" line="220"/> <source>Show Hidden Files</source> <translation>Gizli Dosyaları Göster</translation> </message> <message> <location filename="../MainUI.ui" line="225"/> <source>Scan for Devices</source> <translation>Aygıtlar için Tara</translation> </message> <message> <location filename="../MainUI.ui" line="233"/> <source>Manage Bookmarks</source> <translation>Yer İmlerini Yönet</translation> </message> <message> <location filename="../MainUI.ui" line="247"/> <source>Show Action Buttons</source> <translation>Eylem Düğmelerini Göster</translation> </message> <message> <location filename="../MainUI.ui" line="266"/> <source>Ctrl+F</source> <translation>Ctrl+F</translation> </message> <message> <location filename="../MainUI.cpp" line="69"/> <source>Detailed List</source> <translation>Ayrıntılı Liste</translation> </message> <message> <location filename="../MainUI.cpp" line="70"/> <source>Basic List</source> <translation>Temel Liste</translation> </message> <message> <location filename="../MainUI.ui" line="419"/> <source>Ctrl+W</source> <translation>Ctrl+W</translation> </message> <message> <location filename="../MainUI.ui" line="408"/> <source>F5</source> <translation>F5</translation> </message> <message> <location filename="../MainUI.ui" line="375"/> <source>Ctrl+C</source> <translation>Ctrl+C</translation> </message> <message> <location filename="../MainUI.ui" line="350"/> <source>Rename...</source> <translation>Yeniden adlandır...</translation> </message> <message> <location filename="../MainUI.ui" line="353"/> <source>F2</source> <translation>F2</translation> </message> <message> <location filename="../MainUI.ui" line="361"/> <source>Cut Selection</source> <translation>Seçimi Kes</translation> </message> <message> <location filename="../MainUI.ui" line="372"/> <source>Copy Selection</source> <translation>Seçimi Kopyala</translation> </message> <message> <location filename="../MainUI.ui" line="383"/> <source>Paste</source> <translation>Yapıştır</translation> </message> <message> <location filename="../MainUI.ui" line="386"/> <source>Ctrl+V</source> <translation>Ctrl+V</translation> </message> <message> <location filename="../MainUI.ui" line="364"/> <source>Ctrl+X</source> <translation>Ctrl+X</translation> </message> <message> <location filename="../MainUI.cpp" line="204"/> <source>Invalid Directories</source> <translation>Geçersiz Dizinler</translation> </message> <message> <location filename="../MainUI.cpp" line="204"/> <source>The following directories are invalid and could not be opened:</source> <translation>İzleyen dizinler geçersiz ve açılamadı:</translation> </message> <message> <location filename="../MainUI.cpp" line="238"/> <source>CTRL+B</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.cpp" line="247"/> <source>CTRL+E</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.cpp" line="365"/> <source>Root</source> <translation>Kök</translation> </message> <message> <location filename="../MainUI.cpp" line="372"/> <source>%1 (Type: %2)</source> <translation>%1 (Tür: %2)</translation> </message> <message> <location filename="../MainUI.cpp" line="376"/> <source>Filesystem: %1</source> <translation>Dosya sistemi: %1</translation> </message> <message> <location filename="../MainUI.cpp" line="612"/> <source>New Bookmark</source> <translation>Yeni Yer İmi</translation> </message> <message> <location filename="../MainUI.cpp" line="612"/> <source>Name:</source> <translation>Ad:</translation> </message> <message> <location filename="../MainUI.cpp" line="617"/> <source>Invalid Name</source> <translation>Geçersiz Ad</translation> </message> <message> <location filename="../MainUI.cpp" line="617"/> <source>This bookmark name already exists. Please choose another.</source> <translation>Bu yer imi adı zaten mevcut. Lütfen başka bir ad seçin.</translation> </message> <message> <location filename="../MainUI.cpp" line="638"/> <source>Git Repository Status</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.cpp" line="728"/> <source>Multimedia</source> <translation>Multimedya</translation> </message> <message> <location filename="../MainUI.cpp" line="746"/> <source>Slideshow</source> <translation>Slayt gösterisi</translation> </message> <message> <location filename="../MainUI.cpp" line="926"/> <source>Items to be removed:</source> <translation>Kaldırılacak öğeler:</translation> </message> <message> <location filename="../MainUI.cpp" line="452"/> <source>Verify Quit</source> <translation>Çıkışı Doğrula</translation> </message> <message> <location filename="../MainUI.cpp" line="100"/> <source>Ctrl+H</source> <translation>Ctrl+H</translation> </message> <message> <location filename="../MainUI.cpp" line="101"/> <source>Ctrl+L</source> <translation type="unfinished"></translation> </message> <message> <location filename="../MainUI.cpp" line="452"/> <source>You have multiple tabs open. Are you sure you want to quit?</source> <translation>Açık birden çok sekmeniz mevcut. Çıkmak istediğinize emin misiniz?</translation> </message> <message> <location filename="../MainUI.cpp" line="925"/> <source>Verify Removal</source> <translation>Kaldırmayı Doğrula</translation> </message> <message> <location filename="../MainUI.cpp" line="925"/> <source>WARNING: This will permanently delete the file(s) from the system!</source> <translation>UYARI: Bu işlemle dosya(lar) sistemden kalıcı olarak silinecek!</translation> </message> <message> <location filename="../MainUI.cpp" line="925"/> <source>Are you sure you want to continue?</source> <translation>Devam etmek istediğinize emin misiniz?</translation> </message> <message> <location filename="../MainUI.cpp" line="885"/> <source>Rename File</source> <translation>Dosyayı Yeniden Adlandır</translation> </message> <message> <location filename="../MainUI.cpp" line="885"/> <source>New Name:</source> <translation>Yeni Ad:</translation> </message> <message> <location filename="../MainUI.cpp" line="899"/> <source>Overwrite File?</source> <translation>Dosyanın Üzerine Yazılsın Mı?</translation> </message> <message> <location filename="../MainUI.cpp" line="899"/> <source>An existing file with the same name will be replaced. Are you sure you want to proceed?</source> <translation>Aynı ada sahip mevcut bir dosya yenisiyle değiştirilecek. İlerlemek istediğinize emin misiniz?</translation> </message> </context> <context> <name>MultimediaWidget</name> <message> <location filename="../widgets/MultimediaWidget.ui" line="14"/> <source>Form</source> <translation>Form</translation> </message> <message> <location filename="../widgets/MultimediaWidget.ui" line="28"/> <source>Go To Next</source> <translation>Sonrakine Git</translation> </message> <message> <location filename="../widgets/MultimediaWidget.ui" line="107"/> <source>(No Running Video)</source> <translation>(Oynatılan Video Yok)</translation> </message> <message> <location filename="../widgets/MultimediaWidget.cpp" line="124"/> <source>Playing:</source> <translation>Oynatılıyor:</translation> </message> <message> <location filename="../widgets/MultimediaWidget.cpp" line="130"/> <source>Stopped</source> <translation>Durdu</translation> </message> <message> <location filename="../widgets/MultimediaWidget.cpp" line="157"/> <source>Error Playing File: %1</source> <translation>Dosya Oynatmada Hata: %1</translation> </message> <message> <location filename="../widgets/MultimediaWidget.cpp" line="168"/> <source>Finished</source> <translation>Tamamlandı</translation> </message> </context> <context> <name>OPWidget</name> <message> <location filename="../OPWidget.ui" line="14"/> <source>Form</source> <translation type="unfinished">Form</translation> </message> <message> <location filename="../OPWidget.ui" line="44"/> <location filename="../OPWidget.ui" line="51"/> <source>...</source> <translation type="unfinished">...</translation> </message> <message> <location filename="../OPWidget.ui" line="60"/> <source>Evaluating...</source> <translation type="unfinished"></translation> </message> <message> <location filename="../OPWidget.cpp" line="52"/> <source>Move</source> <translation type="unfinished"></translation> </message> <message> <location filename="../OPWidget.cpp" line="53"/> <source>Copy</source> <translation type="unfinished"></translation> </message> <message> <location filename="../OPWidget.cpp" line="54"/> <source>Remove</source> <translation type="unfinished"></translation> </message> <message> <location filename="../OPWidget.cpp" line="96"/> <source>File Operation Errors</source> <translation type="unfinished"></translation> </message> <message> <location filename="../OPWidget.cpp" line="108"/> <source>%1 Finished</source> <translation type="unfinished"></translation> </message> <message> <location filename="../OPWidget.cpp" line="108"/> <source>Errors Occured</source> <translation type="unfinished"></translation> </message> </context> <context> <name>SlideshowWidget</name> <message> <location filename="../widgets/SlideshowWidget.ui" line="14"/> <source>Form</source> <translation>Form</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="36"/> <source>Delete this image file</source> <translation>Bu görüntü dosyasını sil</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="56"/> <source>Rotate this image file counter-clockwise</source> <translation>Bu görüntü dosyasını saat yönünün tersinde döndür</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="69"/> <source>Rotate this image file clockwise</source> <translation>Bu görüntü dosyasını saat yönünde döndür</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="89"/> <location filename="../widgets/SlideshowWidget.ui" line="92"/> <source>Zoom in</source> <translation>Yakınlaştır</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="105"/> <location filename="../widgets/SlideshowWidget.ui" line="108"/> <source>Zoom out</source> <translation>Uzaklaştır</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="212"/> <source>Go to Beginning</source> <translation>Başa Git</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="215"/> <location filename="../widgets/SlideshowWidget.ui" line="231"/> <location filename="../widgets/SlideshowWidget.ui" line="304"/> <location filename="../widgets/SlideshowWidget.ui" line="320"/> <source>...</source> <translation>...</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="218"/> <source>Shift+Left</source> <translation>Shift+Sol</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="228"/> <source>Go to Previous</source> <translation>Öncekine Git</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="234"/> <source>Left</source> <translation>Sol</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="267"/> <source>File Name</source> <translation>Dosya Adı</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="301"/> <source>Go to Next</source> <translation>Sonrakine Git</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="307"/> <source>Right</source> <translation>Sağ</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="317"/> <source>Go to End</source> <translation>Sona Git</translation> </message> <message> <location filename="../widgets/SlideshowWidget.ui" line="323"/> <source>Shift+Right</source> <translation>Shift+Sağ</translation> </message> <message> <location filename="../widgets/SlideshowWidget.cpp" line="125"/> <source>Verify Removal</source> <translation>Kaldırmayı Doğrula</translation> </message> <message> <location filename="../widgets/SlideshowWidget.cpp" line="125"/> <source>WARNING: This will permanently delete the file from the system!</source> <translation>UYARI: Bu, dosyayı sistemden kalıcı olarak silecek!</translation> </message> <message> <location filename="../widgets/SlideshowWidget.cpp" line="125"/> <source>Are you sure you want to continue?</source> <translation>Devam etmek istediğinize emin misiniz?</translation> </message> </context> <context> <name>TrayUI</name> <message> <location filename="../TrayUI.cpp" line="76"/> <source>Finished</source> <translation type="unfinished"></translation> </message> <message> <location filename="../TrayUI.cpp" line="76"/> <source>Errors during operation. Click to view details</source> <translation type="unfinished"></translation> </message> <message> <location filename="../TrayUI.cpp" line="91"/> <source>New Tasks Running</source> <translation type="unfinished"></translation> </message> </context> <context> <name>XDGDesktopList</name> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="608"/> <source>Multimedia</source> <translation type="unfinished">Multimedya</translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="609"/> <source>Development</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="610"/> <source>Education</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="611"/> <source>Games</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="612"/> <source>Graphics</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="613"/> <source>Network</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="614"/> <source>Office</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="615"/> <source>Science</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="616"/> <source>Settings</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="617"/> <source>System</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="618"/> <source>Utility</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="619"/> <source>Wine</source> <translation type="unfinished"></translation> </message> <message> <location filename="../../../core/libLumina/LuminaXDG.cpp" line="620"/> <source>Unsorted</source> <translation type="unfinished"></translation> </message> </context> </TS>
Java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE124_Buffer_Underwrite__wchar_t_alloca_loop_73a.cpp Label Definition File: CWE124_Buffer_Underwrite.stack.label.xml Template File: sources-sink-73a.tmpl.cpp */ /* * @description * CWE: 124 Buffer Underwrite * BadSource: Set data pointer to before the allocated memory buffer * GoodSource: Set data pointer to the allocated memory buffer * Sinks: loop * BadSink : Copy string to data using a loop * Flow Variant: 73 Data flow: data passed in a list from one function to another in different source files * * */ #include "std_testcase.h" #include <list> #include <wchar.h> using namespace std; namespace CWE124_Buffer_Underwrite__wchar_t_alloca_loop_73 { #ifndef OMITBAD /* bad function declaration */ void badSink(list<wchar_t *> dataList); void bad() { wchar_t * data; list<wchar_t *> dataList; wchar_t * dataBuffer = (wchar_t *)ALLOCA(100*sizeof(wchar_t)); wmemset(dataBuffer, L'A', 100-1); dataBuffer[100-1] = L'\0'; /* FLAW: Set data pointer to before the allocated memory buffer */ data = dataBuffer - 8; /* Put data in a list */ dataList.push_back(data); dataList.push_back(data); dataList.push_back(data); badSink(dataList); } #endif /* OMITBAD */ #ifndef OMITGOOD /* good function declarations */ /* goodG2B uses the GoodSource with the BadSink */ void goodG2BSink(list<wchar_t *> dataList); static void goodG2B() { wchar_t * data; list<wchar_t *> dataList; wchar_t * dataBuffer = (wchar_t *)ALLOCA(100*sizeof(wchar_t)); wmemset(dataBuffer, L'A', 100-1); dataBuffer[100-1] = L'\0'; /* FIX: Set data pointer to the allocated memory buffer */ data = dataBuffer; /* Put data in a list */ dataList.push_back(data); dataList.push_back(data); dataList.push_back(data); goodG2BSink(dataList); } void good() { goodG2B(); } #endif /* OMITGOOD */ } /* close namespace */ /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN using namespace CWE124_Buffer_Underwrite__wchar_t_alloca_loop_73; /* so that we can use good and bad easily */ int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
Java
import React from 'react'; import { shallow } from 'enzyme'; import sinon from 'sinon'; import AddComment from './AddComment'; const USER = { user: { user: 'RSwanson', username: 'Ron_Swanson', imageURL: '', users: [ { name: 'April Ludwig', url: '[email protected]', display: 'April', }, ], }, }; describe('<AddComment>', () => { it('calls submitComment function', () => { const submitCommentFn = sinon.spy(); const wrapper = shallow( <AddComment {...USER} submitComment={submitCommentFn} />, ); const event = { preventDefault: sinon.spy(), }; wrapper.find('button').simulate('onClick', event); expect(submitCommentFn.calledOnce).toBeTruthy; }); });
Java
/* -- translated by f2c (version 20100827). You must link the resulting object file with libf2c: on Microsoft Windows system, link with libf2c.lib; on Linux or Unix systems, link with .../path/to/libf2c.a -lm or, if you install libf2c.a in a standard place, with -lf2c -lm -- in that order, at the end of the command line, as in cc *.o -lf2c -lm Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., http://www.netlib.org/f2c/libf2c.zip */ #include "f2c.h" /* Table of constant values */ static doublecomplex c_b1 = {1.,0.}; static blasint c__1 = 1; /** ZSYTRF_REC2 computes a partial factorization of a complex symmetric matrix using the Bunch-Kaufman diagon al pivoting method. * * This routine is a minor modification of LAPACK's zlasyf. * It serves as an unblocked kernel in the recursive algorithms. * The blocked BLAS Level 3 updates were removed and moved to the * recursive algorithm. * */ /* Subroutine */ void RELAPACK_zsytrf_rec2(char *uplo, blasint *n, blasint * nb, blasint *kb, doublecomplex *a, blasint *lda, blasint *ipiv, doublecomplex *w, blasint *ldw, blasint *info, ftnlen uplo_len) { /* System generated locals */ blasint a_dim1, a_offset, w_dim1, w_offset, i__1, i__2, i__3, i__4; double d__1, d__2, d__3, d__4; doublecomplex z__1, z__2, z__3; /* Builtin functions */ double sqrt(double), d_imag(doublecomplex *); void z_div(doublecomplex *, doublecomplex *, doublecomplex *); /* Local variables */ static blasint j, k; static doublecomplex t, r1, d11, d21, d22; static blasint jj, kk, jp, kp, kw, kkw, imax, jmax; static double alpha; extern logical lsame_(char *, char *, ftnlen, ftnlen); extern /* Subroutine */ blasint zscal_(int *, doublecomplex *, doublecomplex *, blasint *); static blasint kstep; extern /* Subroutine */ blasint zgemv_(char *, blasint *, blasint *, doublecomplex *, doublecomplex *, blasint *, doublecomplex *, blasint *, doublecomplex *, doublecomplex *, blasint *, ftnlen), zcopy_(int *, doublecomplex *, blasint *, doublecomplex *, blasint *), zswap_(int *, doublecomplex *, blasint *, doublecomplex *, blasint *); static double absakk, colmax; extern blasint izamax_(int *, doublecomplex *, blasint *); static double rowmax; /* Parameter adjustments */ a_dim1 = *lda; a_offset = 1 + a_dim1; a -= a_offset; --ipiv; w_dim1 = *ldw; w_offset = 1 + w_dim1; w -= w_offset; /* Function Body */ *info = 0; alpha = (sqrt(17.) + 1.) / 8.; if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) { k = *n; L10: kw = *nb + k - *n; if ((k <= *n - *nb + 1 && *nb < *n) || k < 1) { goto L30; } zcopy_(&k, &a[k * a_dim1 + 1], &c__1, &w[kw * w_dim1 + 1], &c__1); if (k < *n) { i__1 = *n - k; z__1.r = -1., z__1.i = -0.; zgemv_("No transpose", &k, &i__1, &z__1, &a[(k + 1) * a_dim1 + 1], lda, &w[k + (kw + 1) * w_dim1], ldw, &c_b1, &w[kw * w_dim1 + 1], &c__1, (ftnlen)12); } kstep = 1; i__1 = k + kw * w_dim1; absakk = (d__1 = w[i__1].r, abs(d__1)) + (d__2 = d_imag(&w[k + kw * w_dim1]), abs(d__2)); if (k > 1) { i__1 = k - 1; imax = izamax_(&i__1, &w[kw * w_dim1 + 1], &c__1); i__1 = imax + kw * w_dim1; colmax = (d__1 = w[i__1].r, abs(d__1)) + (d__2 = d_imag(&w[imax + kw * w_dim1]), abs(d__2)); } else { colmax = 0.; } if (max(absakk,colmax) == 0.) { if (*info == 0) { *info = k; } kp = k; } else { if (absakk >= alpha * colmax) { kp = k; } else { zcopy_(&imax, &a[imax * a_dim1 + 1], &c__1, &w[(kw - 1) * w_dim1 + 1], &c__1); i__1 = k - imax; zcopy_(&i__1, &a[imax + (imax + 1) * a_dim1], lda, &w[imax + 1 + (kw - 1) * w_dim1], &c__1); if (k < *n) { i__1 = *n - k; z__1.r = -1., z__1.i = -0.; zgemv_("No transpose", &k, &i__1, &z__1, &a[(k + 1) * a_dim1 + 1], lda, &w[imax + (kw + 1) * w_dim1], ldw, &c_b1, &w[(kw - 1) * w_dim1 + 1], &c__1, ( ftnlen)12); } i__1 = k - imax; jmax = imax + izamax_(&i__1, &w[imax + 1 + (kw - 1) * w_dim1], &c__1); i__1 = jmax + (kw - 1) * w_dim1; rowmax = (d__1 = w[i__1].r, abs(d__1)) + (d__2 = d_imag(&w[ jmax + (kw - 1) * w_dim1]), abs(d__2)); if (imax > 1) { i__1 = imax - 1; jmax = izamax_(&i__1, &w[(kw - 1) * w_dim1 + 1], &c__1); /* Computing MAX */ i__1 = jmax + (kw - 1) * w_dim1; d__3 = rowmax, d__4 = (d__1 = w[i__1].r, abs(d__1)) + ( d__2 = d_imag(&w[jmax + (kw - 1) * w_dim1]), abs( d__2)); rowmax = max(d__3,d__4); } if (absakk >= alpha * colmax * (colmax / rowmax)) { kp = k; } else /* if(complicated condition) */ { i__1 = imax + (kw - 1) * w_dim1; if ((d__1 = w[i__1].r, abs(d__1)) + (d__2 = d_imag(&w[ imax + (kw - 1) * w_dim1]), abs(d__2)) >= alpha * rowmax) { kp = imax; zcopy_(&k, &w[(kw - 1) * w_dim1 + 1], &c__1, &w[kw * w_dim1 + 1], &c__1); } else { kp = imax; kstep = 2; } } } kk = k - kstep + 1; kkw = *nb + kk - *n; if (kp != kk) { i__1 = kp + kp * a_dim1; i__2 = kk + kk * a_dim1; a[i__1].r = a[i__2].r, a[i__1].i = a[i__2].i; i__1 = kk - 1 - kp; zcopy_(&i__1, &a[kp + 1 + kk * a_dim1], &c__1, &a[kp + (kp + 1) * a_dim1], lda); if (kp > 1) { i__1 = kp - 1; zcopy_(&i__1, &a[kk * a_dim1 + 1], &c__1, &a[kp * a_dim1 + 1], &c__1); } if (k < *n) { i__1 = *n - k; zswap_(&i__1, &a[kk + (k + 1) * a_dim1], lda, &a[kp + (k + 1) * a_dim1], lda); } i__1 = *n - kk + 1; zswap_(&i__1, &w[kk + kkw * w_dim1], ldw, &w[kp + kkw * w_dim1], ldw); } if (kstep == 1) { zcopy_(&k, &w[kw * w_dim1 + 1], &c__1, &a[k * a_dim1 + 1], & c__1); z_div(&z__1, &c_b1, &a[k + k * a_dim1]); r1.r = z__1.r, r1.i = z__1.i; i__1 = k - 1; zscal_(&i__1, &r1, &a[k * a_dim1 + 1], &c__1); } else { if (k > 2) { i__1 = k - 1 + kw * w_dim1; d21.r = w[i__1].r, d21.i = w[i__1].i; z_div(&z__1, &w[k + kw * w_dim1], &d21); d11.r = z__1.r, d11.i = z__1.i; z_div(&z__1, &w[k - 1 + (kw - 1) * w_dim1], &d21); d22.r = z__1.r, d22.i = z__1.i; z__3.r = d11.r * d22.r - d11.i * d22.i, z__3.i = d11.r * d22.i + d11.i * d22.r; z__2.r = z__3.r - 1., z__2.i = z__3.i - 0.; z_div(&z__1, &c_b1, &z__2); t.r = z__1.r, t.i = z__1.i; z_div(&z__1, &t, &d21); d21.r = z__1.r, d21.i = z__1.i; i__1 = k - 2; for (j = 1; j <= i__1; ++j) { i__2 = j + (k - 1) * a_dim1; i__3 = j + (kw - 1) * w_dim1; z__3.r = d11.r * w[i__3].r - d11.i * w[i__3].i, z__3.i = d11.r * w[i__3].i + d11.i * w[i__3] .r; i__4 = j + kw * w_dim1; z__2.r = z__3.r - w[i__4].r, z__2.i = z__3.i - w[i__4] .i; z__1.r = d21.r * z__2.r - d21.i * z__2.i, z__1.i = d21.r * z__2.i + d21.i * z__2.r; a[i__2].r = z__1.r, a[i__2].i = z__1.i; i__2 = j + k * a_dim1; i__3 = j + kw * w_dim1; z__3.r = d22.r * w[i__3].r - d22.i * w[i__3].i, z__3.i = d22.r * w[i__3].i + d22.i * w[i__3] .r; i__4 = j + (kw - 1) * w_dim1; z__2.r = z__3.r - w[i__4].r, z__2.i = z__3.i - w[i__4] .i; z__1.r = d21.r * z__2.r - d21.i * z__2.i, z__1.i = d21.r * z__2.i + d21.i * z__2.r; a[i__2].r = z__1.r, a[i__2].i = z__1.i; /* L20: */ } } i__1 = k - 1 + (k - 1) * a_dim1; i__2 = k - 1 + (kw - 1) * w_dim1; a[i__1].r = w[i__2].r, a[i__1].i = w[i__2].i; i__1 = k - 1 + k * a_dim1; i__2 = k - 1 + kw * w_dim1; a[i__1].r = w[i__2].r, a[i__1].i = w[i__2].i; i__1 = k + k * a_dim1; i__2 = k + kw * w_dim1; a[i__1].r = w[i__2].r, a[i__1].i = w[i__2].i; } } if (kstep == 1) { ipiv[k] = kp; } else { ipiv[k] = -kp; ipiv[k - 1] = -kp; } k -= kstep; goto L10; L30: j = k + 1; L60: jj = j; jp = ipiv[j]; if (jp < 0) { jp = -jp; ++j; } ++j; if (jp != jj && j <= *n) { i__1 = *n - j + 1; zswap_(&i__1, &a[jp + j * a_dim1], lda, &a[jj + j * a_dim1], lda); } if (j < *n) { goto L60; } *kb = *n - k; } else { k = 1; L70: if ((k >= *nb && *nb < *n) || k > *n) { goto L90; } i__1 = *n - k + 1; zcopy_(&i__1, &a[k + k * a_dim1], &c__1, &w[k + k * w_dim1], &c__1); i__1 = *n - k + 1; i__2 = k - 1; z__1.r = -1., z__1.i = -0.; zgemv_("No transpose", &i__1, &i__2, &z__1, &a[k + a_dim1], lda, &w[k + w_dim1], ldw, &c_b1, &w[k + k * w_dim1], &c__1, (ftnlen)12); kstep = 1; i__1 = k + k * w_dim1; absakk = (d__1 = w[i__1].r, abs(d__1)) + (d__2 = d_imag(&w[k + k * w_dim1]), abs(d__2)); if (k < *n) { i__1 = *n - k; imax = k + izamax_(&i__1, &w[k + 1 + k * w_dim1], &c__1); i__1 = imax + k * w_dim1; colmax = (d__1 = w[i__1].r, abs(d__1)) + (d__2 = d_imag(&w[imax + k * w_dim1]), abs(d__2)); } else { colmax = 0.; } if (max(absakk,colmax) == 0.) { if (*info == 0) { *info = k; } kp = k; } else { if (absakk >= alpha * colmax) { kp = k; } else { i__1 = imax - k; zcopy_(&i__1, &a[imax + k * a_dim1], lda, &w[k + (k + 1) * w_dim1], &c__1); i__1 = *n - imax + 1; zcopy_(&i__1, &a[imax + imax * a_dim1], &c__1, &w[imax + (k + 1) * w_dim1], &c__1); i__1 = *n - k + 1; i__2 = k - 1; z__1.r = -1., z__1.i = -0.; zgemv_("No transpose", &i__1, &i__2, &z__1, &a[k + a_dim1], lda, &w[imax + w_dim1], ldw, &c_b1, &w[k + (k + 1) * w_dim1], &c__1, (ftnlen)12); i__1 = imax - k; jmax = k - 1 + izamax_(&i__1, &w[k + (k + 1) * w_dim1], &c__1) ; i__1 = jmax + (k + 1) * w_dim1; rowmax = (d__1 = w[i__1].r, abs(d__1)) + (d__2 = d_imag(&w[ jmax + (k + 1) * w_dim1]), abs(d__2)); if (imax < *n) { i__1 = *n - imax; jmax = imax + izamax_(&i__1, &w[imax + 1 + (k + 1) * w_dim1], &c__1); /* Computing MAX */ i__1 = jmax + (k + 1) * w_dim1; d__3 = rowmax, d__4 = (d__1 = w[i__1].r, abs(d__1)) + ( d__2 = d_imag(&w[jmax + (k + 1) * w_dim1]), abs( d__2)); rowmax = max(d__3,d__4); } if (absakk >= alpha * colmax * (colmax / rowmax)) { kp = k; } else /* if(complicated condition) */ { i__1 = imax + (k + 1) * w_dim1; if ((d__1 = w[i__1].r, abs(d__1)) + (d__2 = d_imag(&w[ imax + (k + 1) * w_dim1]), abs(d__2)) >= alpha * rowmax) { kp = imax; i__1 = *n - k + 1; zcopy_(&i__1, &w[k + (k + 1) * w_dim1], &c__1, &w[k + k * w_dim1], &c__1); } else { kp = imax; kstep = 2; } } } kk = k + kstep - 1; if (kp != kk) { i__1 = kp + kp * a_dim1; i__2 = kk + kk * a_dim1; a[i__1].r = a[i__2].r, a[i__1].i = a[i__2].i; i__1 = kp - kk - 1; zcopy_(&i__1, &a[kk + 1 + kk * a_dim1], &c__1, &a[kp + (kk + 1) * a_dim1], lda); if (kp < *n) { i__1 = *n - kp; zcopy_(&i__1, &a[kp + 1 + kk * a_dim1], &c__1, &a[kp + 1 + kp * a_dim1], &c__1); } if (k > 1) { i__1 = k - 1; zswap_(&i__1, &a[kk + a_dim1], lda, &a[kp + a_dim1], lda); } zswap_(&kk, &w[kk + w_dim1], ldw, &w[kp + w_dim1], ldw); } if (kstep == 1) { i__1 = *n - k + 1; zcopy_(&i__1, &w[k + k * w_dim1], &c__1, &a[k + k * a_dim1], & c__1); if (k < *n) { z_div(&z__1, &c_b1, &a[k + k * a_dim1]); r1.r = z__1.r, r1.i = z__1.i; i__1 = *n - k; zscal_(&i__1, &r1, &a[k + 1 + k * a_dim1], &c__1); } } else { if (k < *n - 1) { i__1 = k + 1 + k * w_dim1; d21.r = w[i__1].r, d21.i = w[i__1].i; z_div(&z__1, &w[k + 1 + (k + 1) * w_dim1], &d21); d11.r = z__1.r, d11.i = z__1.i; z_div(&z__1, &w[k + k * w_dim1], &d21); d22.r = z__1.r, d22.i = z__1.i; z__3.r = d11.r * d22.r - d11.i * d22.i, z__3.i = d11.r * d22.i + d11.i * d22.r; z__2.r = z__3.r - 1., z__2.i = z__3.i - 0.; z_div(&z__1, &c_b1, &z__2); t.r = z__1.r, t.i = z__1.i; z_div(&z__1, &t, &d21); d21.r = z__1.r, d21.i = z__1.i; i__1 = *n; for (j = k + 2; j <= i__1; ++j) { i__2 = j + k * a_dim1; i__3 = j + k * w_dim1; z__3.r = d11.r * w[i__3].r - d11.i * w[i__3].i, z__3.i = d11.r * w[i__3].i + d11.i * w[i__3] .r; i__4 = j + (k + 1) * w_dim1; z__2.r = z__3.r - w[i__4].r, z__2.i = z__3.i - w[i__4] .i; z__1.r = d21.r * z__2.r - d21.i * z__2.i, z__1.i = d21.r * z__2.i + d21.i * z__2.r; a[i__2].r = z__1.r, a[i__2].i = z__1.i; i__2 = j + (k + 1) * a_dim1; i__3 = j + (k + 1) * w_dim1; z__3.r = d22.r * w[i__3].r - d22.i * w[i__3].i, z__3.i = d22.r * w[i__3].i + d22.i * w[i__3] .r; i__4 = j + k * w_dim1; z__2.r = z__3.r - w[i__4].r, z__2.i = z__3.i - w[i__4] .i; z__1.r = d21.r * z__2.r - d21.i * z__2.i, z__1.i = d21.r * z__2.i + d21.i * z__2.r; a[i__2].r = z__1.r, a[i__2].i = z__1.i; /* L80: */ } } i__1 = k + k * a_dim1; i__2 = k + k * w_dim1; a[i__1].r = w[i__2].r, a[i__1].i = w[i__2].i; i__1 = k + 1 + k * a_dim1; i__2 = k + 1 + k * w_dim1; a[i__1].r = w[i__2].r, a[i__1].i = w[i__2].i; i__1 = k + 1 + (k + 1) * a_dim1; i__2 = k + 1 + (k + 1) * w_dim1; a[i__1].r = w[i__2].r, a[i__1].i = w[i__2].i; } } if (kstep == 1) { ipiv[k] = kp; } else { ipiv[k] = -kp; ipiv[k + 1] = -kp; } k += kstep; goto L70; L90: j = k - 1; L120: jj = j; jp = ipiv[j]; if (jp < 0) { jp = -jp; --j; } --j; if (jp != jj && j >= 1) { zswap_(&j, &a[jp + a_dim1], lda, &a[jj + a_dim1], lda); } if (j > 1) { goto L120; } *kb = k - 1; } return; }
Java
--pass out-of-range data of string type to the parameter --1. [error] out-of-range argument: timestamptz type select last_day(timestamptz'23:00:00 13/01'); select last_day(timestamptz'04:14:07 1/19/2038'); select last_day(timestamptz'03:15:07 1/19/2038'); select last_day(timestamptz'03:14:08 1/19/2038'); select last_day(timestamptz'03:14:07 2/19/2038'); select last_day(timestamptz'03:14:07 1/20/2038'); select last_day(timestamptz'03:14:07 1/19/2039'); --?? select last_day(timestamptz'03:14:07 PM 1/19/2038'); select last_day(timestamptz'0:0:0 PM 1969-01-01'); select last_day(timestamptz'11:03:22 PM 1864-01-23'); select last_day(timestamptz'2300-12-12 22:02:33'); select last_day(timestamptz'2020-23-11 03:14:66 pm'); select last_day(timestamptz'1970-10-101 0:0'); select last_day(timestamptz'1999/12/11 3:14:7 am'); select last_day(timestamptz'2010-4-31 3:14:7 am'); --2. [error] out-of-range argument: datetimetz type select last_day(datetimetz'2010-10 10:10:100.00 am'); select last_day(datetimetz'24:59:59.999 12/31/9999'); select last_day(datetimetz'23:60:59.999 12/31/9999'); select last_day(datetimetz'23:59:60.999 12/31/9999'); select last_day(datetimetz'23:59:59.1000 12/31/9999'); select last_day(datetimetz'23:59:59.999 13/31/9999'); select last_day(datetimetz'23:59:59.999 12/32/9999'); select last_day(datetimetz'23:59:59.999 12/31/10000'); select last_day(datetimetz'20:33:61.111 1990-10-19 '); select last_day(datetimetz'2/31/2022 10:20:30.400'); select last_day(datetimetz'12/31/9999 23:59:59.999'); select last_day(datetimetz'0-12-12 23:59:59.999');
Java
/************************************************************* * Project: NetCoreCMS * * Web: http://dotnetcorecms.org * * Author: OnnoRokom Software Ltd. * * Website: www.onnorokomsoftware.com * * Email: [email protected] * * Copyright: OnnoRokom Software Ltd. * * License: BSD-3-Clause * *************************************************************/ using NetCoreCMS.Framework.Core.Data; using NetCoreCMS.Framework.Core.Models; using NetCoreCMS.Framework.Core.Mvc.Repository; namespace NetCoreCMS.Framework.Core.Repository { public class NccWebSiteRepository : BaseRepository<NccWebSite, long> { public NccWebSiteRepository(NccDbContext context) : base(context) { } } }
Java
# -*- coding: utf-8 -*- # # アルゴリズムデザインコンテストのさまざまな処理 # # Copyright (C) 2015 Fujitsu import numberlink from datastore import * from hashlib import sha1, sha256 from flask import make_response, render_template import random import datetime from tz import gae_datetime_JST from define import DEFAULT_YEAR def adc_response(msg, isjson, code=200, json_encoded=False): if json_encoded: body = msg else: template = 'response.json' if isjson else 'response.html' body = render_template(template, msg=msg) resp = make_response(body) if code == 200: resp.status = 'OK' elif code == 400: resp.status = 'Bad Request' elif code == 401: resp.status = 'Unauthorized' resp.status_code = code resp.headers['Content-Type'] = 'application/json' if isjson else 'text/html; charset=utf-8' return resp def adc_response_html(html, code=200): template = 'raw.html' body = render_template(template, raw=html) resp = make_response(body) resp.status_code = code resp.headers['Content-Type'] = 'text/html; charset=utf-8' return resp def adc_response_text(body, code=200): resp = make_response(body) resp.status_code = code resp.headers['Content-Type'] = 'text/plain; charset=utf-8' return resp def adc_response_json(body, code=200): resp = make_response(body) resp.status_code = code resp.headers['Content-Type'] = 'application/json' return resp def adc_response_Q_data(result): "問題テキストデータを返す" if result is None: code = 404 text = "Not Found\r\n" else: code = 200 text = result.text return adc_response_text(text, code) def log(username, what): root = log_key() i = Log(parent = root, username = username, what = what) i.put() def log_get_or_delete(username=None, fetch_num=100, when=None, delete=False): query = Log.query(ancestor = log_key()).order(-Log.date) if username is not None: query = query.filter(Log.username == username) if when is not None: before = datetime.datetime.now() - when #print "before=", before query = query.filter(Log.date > before) q = query.fetch(fetch_num) results = [] for i in q: if delete: tmp = { 'date': gae_datetime_JST(i.date) } i.key.delete() else: tmp = { 'date': gae_datetime_JST(i.date), 'username': i.username, 'what': i.what } results.append( tmp ) return results def adc_login(salt, username, password, users): "パスワードがあっているかチェックする" hashed256 = hashed_password(username, password, salt) u = adc_get_user_info(username, users) if u is not None and u[1]==hashed256: return u else: return None def adc_change_password(salt, username, users, attr, priv_admin=False): "パスワード変更。管理者は他人のパスワードも変更できる。" if ('password_old' in attr and 'password_new1' in attr and 'password_new2' in attr): if not priv_admin: # 管理者でないときは、現在のパスワードをチェック u = adc_login(salt, username, attr['password_old'], users) if u is None: return False, "password mismatched" if attr['password_new1'] != attr['password_new2']: return False, "new password is not same" if change_password(username, attr['password_new1'].encode('utf-8'), salt): return True, "password changed" else: return False, "password change failed" else: return False, "error" def adc_get_user_info(username, users): # まずはローカルに定義されたユーザを検索 for u in users: if username == (u[0]): return u # 次に、データベースに登録されたユーザを検索 r = get_userinfo(username) if r is not None: return [r.username, r.password, r.displayname, r.uid, r.gid] else: return None def adc_get_user_list(users): res = [] # まずはローカルに定義されたユーザを検索 for u in users: res.append(u[0]) # 次に、データベースに登録されたユーザを検索 res2 = get_username_list() res.extend(res2) return res def insert_Q_data(q_num, text, author="DASymposium", year=DEFAULT_YEAR, uniq=True): """ 問題データをデータベースに登録する。 uniq==Trueのとき、q_numとauthorが重複する場合、登録は失敗する。 """ #重複チェック if uniq: q = get_user_Q_data(q_num, author, year) if q is not None: return (False, "Error: Q%d data already exists" % q_num) # 重複エラー # 問題データのチェック (size, line_num, line_mat, msg, ok) = numberlink.read_input_data(text) if not ok: return (False, "Error: syntax error in Q data\n"+msg) # text2は、textを正規化したテキストデータ(改行コードなど) text2 = numberlink.generate_Q_data(size, line_num, line_mat) # rootエンティティを決める userinfo = get_userinfo(author) if userinfo is None: return (False, "Error: user not found: %s" % author) else: root = userinfo.key # 問題データのエンティティ q = Question( parent = root, id = str(q_num), qnum = q_num, text = text2, rows = size[1], # Y cols = size[0], # X linenum = line_num, author = author ) # 登録する q.put() # return (True, size, line_num) def update_Q_data(q_num, text, author="DASymposium", year=DEFAULT_YEAR): "問題データを変更する" # 問題データの内容チェック (size, line_num, line_mat, msg, ok) = numberlink.read_input_data(text) if not ok: return (False, "Error: syntax error in Q data\n"+msg, None, None) text2 = numberlink.generate_Q_data(size, line_num, line_mat) # 既存のエンティティを取り出す res = get_user_Q_data(q_num, author, year) if res is None: num = 0 else: num = 1 res.text = text2 res.rows = size[1] res.cols = size[0] res.linenum = line_num res.put() return (True, num, size, line_num) def get_Q_data(q_num, year=DEFAULT_YEAR, fetch_num=5): "出題の番号を指定して、Question問題データをデータベースから取り出す" qla = ndb.Key(QuestionListAll, 'master', parent=qdata_key()).get() if qla is None: return None # q_numは1から始まる整数なので、配列のインデックスとは1だけずれる qn = q_num-1 if qn < 0 or len(qla.qs) <= qn: return None return qla.qs[q_num-1].get() def get_Q_author_all(): "出題の番号から、authorを引けるテーブルを作る" qla = ndb.Key(QuestionListAll, 'master', parent=qdata_key()).get() if qla is None: return None authors = ['']*(len(qla.qs)+1) # q_numは1から始まるので、+1しておく qn = 1 # 出題番号 for q_key in qla.qs: q = q_key.get() authors[qn] = q.author qn += 1 # q.qnum は、問題登録したときの番号であり、出題番号ではない return authors def get_Q_data_text(q_num, year=DEFAULT_YEAR, fetch_num=5): "問題のテキストを返す" result = get_Q_data(q_num, year, fetch_num) if result is not None: text = result.text ret = True else: # result is None text = "Error: data not found: Q%d" % q_num ret = False return ret, text def get_user_Q_data(q_num, author, year=DEFAULT_YEAR, fetch_num=99): "qnumとauthorを指定して問題データをデータベースから取り出す" userinfo = get_userinfo(author) if userinfo is None: root = qdata_key(year) else: root = userinfo.key key = ndb.Key(Question, str(q_num), parent=root) return key.get() def get_admin_Q_all(): "データベースに登録されたすべての問題の一覧リスト" #query = Question.query().order(Question.author, Question.qnum) query = Question.query(ancestor=userlist_key()).order(Question.author, Question.qnum) q = query.fetch() num = len(q) out = str(num) + "\n" for i in q: dt = gae_datetime_JST(i.date) out += "Q%02d SIZE %dX%d LINE_NUM %d (%s) %s\n" % (i.qnum, i.cols, i.rows, i.linenum, i.author, dt) return out def admin_Q_list_get(): "コンテストの出題リストを取り出す" qla = ndb.Key(QuestionListAll, 'master', parent=qdata_key()).get() if qla is None: return '' else: return qla.text_admin def admin_Q_list_create(): "コンテスト用の出題リストを作成する" #query = Question.query(ancestor=userlist_key()).order(Question.author, Question.qnum) query = Question.query(ancestor=userlist_key()) qlist = [] q = query.fetch() num = len(q) for i in q: qlist.append([i.qnum, i.author, i.key]) random.shuffle(qlist) out = str(num) + "\n" root = qdata_key() #既存の問題リストを削除する … のはやめた #out += admin_Q_list_delete() + "\n" num = 1 out_admin = "" out_user = "" qs = [] for i in qlist: qs.append(i[2]) out_admin += "Q%d %s %d\n" % (num, i[1], i[0]) out_user += "Q%d\n" % num num += 1 out += out_admin qla = QuestionListAll.get_or_insert('master', parent=root, qs=qs, text_admin=out_admin, text_user=out_user) if qla.text_admin != out_admin: out += "Already inserted\n" return out def admin_Q_list_delete(): "コンテストの出題リストを削除する" root = qdata_key() ndb.Key(QuestionListAll, 'master', parent=root).delete() return "DELETE Q-list" def get_Q_all(html=False): "問題データの一覧リストを返す" qla = ndb.Key(QuestionListAll, 'master', parent=qdata_key()).get() if qla is None: return '' if html: out = "" num=1 for i in qla.text_user.splitlines(): out += '<a href="/Q/%d">%s</a><br />\n' % (num, i) num += 1 return out else: return qla.text_user def menu_post_A(username): "回答ファイルをアップロードするフォームを返す" qla = ndb.Key(QuestionListAll, 'master', parent=qdata_key()).get() if qla is None: return '' out = "" num=1 for i in qla.text_user.splitlines(): out += '<a href="/A/%s/Q/%d">post answer %s</a><br />\n' % (username, num, i) num += 1 return out def post_A(username, atext, form): anum = (int)(form['anum']) cpu_sec = 0 mem_byte = 0 try: cpu_sec = (float)(form['cpu_sec']) mem_byte = (int)(form['mem_byte']) except ValueError: # (float)'' がエラー pass misc_text = form['misc_text'] print "A%d\n%f\n%d\n%s" % (anum, cpu_sec, mem_byte, misc_text.encode('utf-8')) return put_A_data(anum, username, atext, cpu_sec, mem_byte, misc_text) def get_user_Q_all(author, html=None): "authorを指定して、問題データの一覧リストを返す" userinfo = get_userinfo(author) if userinfo is None: root = qdata_key() else: root = userinfo.key query = Question.query( ancestor = root ).order(Question.qnum) #query = query.filter(Question.author == author ) q = query.fetch() num = len(q) out = "" for i in q: if html is None: out += "Q%d SIZE %dX%d LINE_NUM %d (%s)\n" % (i.qnum, i.cols, i.rows, i.linenum, i.author) else: url = '/user/%s/Q/%d' % (author, i.qnum) out += '<a href="%s">Q%d SIZE %dX%d LINE_NUM %d (%s)</a><br />\n' % (url, i.qnum, i.cols, i.rows, i.linenum, i.author) return out def delete_user_Q_data(q_num, author, year=DEFAULT_YEAR): "qnumとauthorを指定して、問題データをデータベースから削除する" res = get_user_Q_data(q_num, author, year) msg = "" if res is None: msg = "Q%d data not found" % q_num else: msg += "DELETE /user/%s/Q/%d\n" % (author, q_num) res.key.delete() return msg def get_admin_A_all(): "データベースに登録されたすべての回答データの一覧リスト" #query = Answer.query(ancestor=userlist_key()).order(Answer.owner, Answer.anum) query = Answer.query(ancestor=userlist_key()) q = query.fetch() num = len(q) out = str(num) + "\n" for i in q: dt = gae_datetime_JST(i.date) out += "A%02d (%s) %s\n" % (i.anum, i.owner, dt) return out def get_A_data(a_num=None, username=None): """ データベースから回答データを取り出す。 a_numがNoneのとき、複数のデータを返す。 a_numが数値のとき、その数値のデータを1つだけ返す。存在しないときはNone。 """ if username is None: root = userlist_key() else: userinfo = get_userinfo(username) if userinfo is None: msg = "ERROR: user not found: %s" % username return False, msg, None root = userinfo.key if a_num is not None: a = ndb.Key(Answer, str(a_num), parent=root).get() return True, a, root #query = Answer.query(ancestor=root).order(Answer.anum) query = Answer.query(ancestor=root) #if a_num is not None: # query = query.filter(Answer.anum == a_num) q = query.fetch() return True, q, root def put_A_data(a_num, username, text, cpu_sec=None, mem_byte=None, misc_text=None): "回答データをデータベースに格納する" msg = "" # 出題データを取り出す ret, q_text = get_Q_data_text(a_num) if not ret: msg = "Error in Q%d data: " % a_num + q_text return False, msg # 重複回答していないかチェック ret, q, root = get_A_data(a_num, username) if ret==True and q is not None: msg += "ERROR: duplicated answer\n"; return False, msg # 回答データのチェックをする judges, msg = numberlink.check_A_data(text, q_text) q = 0.0 if judges[0] != True: msg += "Error in answer A%d\n" % a_num check_A = False else: check_A = True # 正解 q = judges[1] # 解の品質 msg += "Quality factor = %1.19f\n" % q # データベースに登録する。不正解でも登録する a = Answer( parent = root, id = str(a_num), anum = a_num, text = text, owner = username, cpu_sec = cpu_sec, mem_byte = mem_byte, misc_text = misc_text, result = msg[-1499:], # 長さ制限がある。末尾のみ保存。 judge = int(check_A), q_factor = q ) a_key = a.put() return True, msg def put_A_info(a_num, username, info): "回答データの補足情報をデータベースに格納する" msg = "" # 回答データを取り出す。rootはUserInfoのkey、aはAnswer ret, a, root = get_A_data(a_num, username) if ret==False or a is None: if ret==False: msg += a + "\n" msg += "ERROR: A%d data not found" % a_num return False, msg a.cpu_sec = info['cpu_sec'] a.mem_byte = info['mem_byte'] a.misc_text = info['misc_text'] a.put() msg += "UPDATE A%d info\n" % a_num return True, msg def get_or_delete_A_data(a_num=None, username=None, delete=False): "回答データをデータベースから、削除or取り出し" ret, q, root = get_A_data(a_num=a_num, username=username) if not ret: return False, q # q==msg if q is None: return ret, [] result = [] if a_num is None: # a_num==Noneのとき、データが複数個になる q2 = q else: q2 = [q] if delete: get_or_delete_A_info(a_num=a_num, username=username, delete=True) for i in q2: result.append("DELETE A%d" % i.anum) i.key.delete() else: # GETの場合 for i in q2: result.append("GET A%d" % i.anum) result.append(i.text) return True, result def get_user_A_all(username, html=None): "ユーザーを指定して、回答データの一覧リストを返す" ret, q, root = get_A_data(username=username) if not ret: return False, q text = "" for i in q: if html: text += '<a href="/A/%s/Q/%d">A%d</a> <a href="/A/%s/Q/%d/info">info</a><br />\n' % (username, i.anum, i.anum, username, i.anum) else: text += 'A%d\n' % i.anum return True, text def get_or_delete_A_info(a_num=None, username=None, delete=False): "回答データの補足情報をデータベースから、削除or取り出し" msg = "" r, a, root = get_A_data(a_num, username) if not r: return False, a, None if a_num is None: q = a else: if a is None: msg += "A%d not found" % a_num return True, msg, [] q = [a] results = [] num = 0 for i in q: num += 1 if delete: results.append({'anum': i.anum}) i.cpu_sec = None i.mem_byte = None i.misc_text = None i.put() else: tmp = i.to_dict() del tmp['text'] results.append( tmp ) method = 'DELETE' if delete else 'GET' a_num2 = 0 if a_num is None else a_num msg += "%s A%d info %d" % (method, a_num2, num) return True, msg, results def hashed_password(username, password, salt): "ハッシュ化したパスワード" tmp = salt + username.encode('utf-8') + password.encode('utf-8') return sha256(tmp).hexdigest() def create_user(username, password, displayname, uid, gid, salt): "ユーザーをデータベースに登録" hashed = hashed_password(username, password, salt) userlist = userlist_key() u = UserInfo( parent = userlist, id = username, username = username, password = hashed, displayname = displayname, uid = uid, gid = gid ) u.put() def change_password(username, password, salt): "パスワード変更" info = get_userinfo(username) if info is None: return False hashed = hashed_password(username, password, salt) info.password = hashed info.put() return True def get_username_list(): "ユーザー名の一覧リストをデータベースから取り出す" #query = UserInfo.query( ancestor = userlist_key() ).order(UserInfo.uid) query = UserInfo.query( ancestor = userlist_key() ) q = query.fetch() res = [] for u in q: res.append(u.username) return res def get_userinfo(username): "ユーザー情報をデータベースから取り出す" key = ndb.Key(UserInfo, username, parent=userlist_key()) info = key.get() return info def delete_user(username): "ユーザーをデータベースから削除" userinfo = get_userinfo(username) if userinfo is None: return 0 else: userinfo.key.delete() return 1 return n def Q_check(qtext): "問題ファイルの妥当性チェックを行う" hr = '-'*40 + "\n" (size, line_num, line_mat, msg, ok) = numberlink.read_input_data(qtext) if ok: q = numberlink.generate_Q_data(size, line_num, line_mat) out = "OK\n" + hr + q + hr else: out = "NG\n" + hr + qtext + hr + msg return out, ok def calc_score_all(): "スコア計算" authors = get_Q_author_all() #print "authors=", authors q_factors = {} q_point = {} ok_point = {} bonus_point = {} result = {} misc = {} query = Answer.query(ancestor=userlist_key()) q = query.fetch() all_numbers = {} all_users = {} for i in q: #anum = 'A%d' % i.anum anum = 'A%02d' % i.anum username = i.owner all_numbers[anum] = 1 all_users[username] = 1 # 正解ポイント if not(anum in ok_point): ok_point[anum] = {} ok_point[anum][username] = i.judge # 品質ポイント if not(anum in q_factors): q_factors[anum] = {} q_factors[anum][username] = i.q_factor # 出題ボーナスポイント if i.judge in (0,1) and authors[i.anum] == username: #print "check_bonus:", i.anum, i.judge, authors[i.anum], username if not(anum in bonus_point): bonus_point[anum] = {} bonus_point[anum][username] = i.judge # result(ログメッセージ) if not(anum in result): result[anum] = {} result[anum][username] = i.result # (その他) date, cpu_sec, mem_byte, misc_text if not(anum in misc): misc[anum] = {} misc[anum][username] = [i.date, i.cpu_sec, i.mem_byte, i.misc_text] #print "ok_point=", ok_point #print "bonus_point=", bonus_point #print "q_factors=", q_factors #print "result=\n", result # 品質ポイントを計算する q_pt = 10.0 for anum, values in q_factors.iteritems(): # 問題番号ごとに #print "anum=", anum qf_total = 0.0 # Q_factorの合計 for user, qf in values.iteritems(): #print "qf=", qf qf_total += qf #print "qf_total=", qf_total for user, qf in values.iteritems(): if qf_total == 0.0: tmp = 0.0 else: tmp = q_pt * qf / qf_total if not anum in q_point: q_point[anum] = {} q_point[anum][user] = tmp #print "q_point=", q_point # 集計する tmp = ['']*(len(all_numbers) + 1) i = 0 for anum in sorted(all_numbers.keys()): tmp[i] = anum i += 1 tmp[i] = 'TOTAL' score_board = {'/header/': tmp} # 見出しの行 for user in sorted(all_users.keys()): #print user if not(user in score_board): score_board[user] = [0]*(len(all_numbers) + 1) i = 0 ptotal = 0.0 for anum in sorted(all_numbers.keys()): #print anum p = 0.0 if user in ok_point[anum]: p += ok_point[anum][user] if user in q_point[anum]: p += q_point[anum][user] if anum in bonus_point and user in bonus_point[anum]: p += bonus_point[anum][user] #print "p=", p score_board[user][i] = p ptotal += p i += 1 score_board[user][i] = ptotal #print "score_board=", score_board return score_board, ok_point, q_point, bonus_point, q_factors, result, misc def html_score_board(score_board): hd_key = '/header/' out = '<table border=1>\n' line = '<tr><th>-</th>' for hd in score_board[hd_key]: line += '<th>%s</th>' % hd line += '</tr>\n' out += line for user in sorted(score_board.keys()): if user == hd_key: continue line = '<tr><th>%s</th>' % user for val in score_board[user]: line += '<td>%1.1f</td>' % val line += '</tr>\n' out += line out += '</table>\n' #print "out=\n", out return out
Java
{% extends "hub/base.html" %} {% load staticfiles %} {% block pagetitle %}Users{% endblock %} {% block content %} <div class="dashhead"> <div class="dashhead-titles"> <h6 class="dashhead-subtitle">UoP Botswana MoH / TB Training</h6> <h2 class="dashhead-title">Users</h2> </div> </div> <hr class="m-t"> <div class="flextable"> <form class="form-inline" method="post" action="."> {% csrf_token %} <div class="form-group"> <label for="code">Facility Code</label> {{ form.code }} <!-- <select class="custom-select form-control" name="address_type" id="address_type"> <option value="msisdn">Cell Phone</option> </select> --> </div> <button type="submit" class="btn btn-default">Search</button> <b>Results:</b> {{ identities.count }} </form> </div> <div class="table-full"> <div class="table-responsive"> <table class="table" data-sort="table"> <thead> <tr> <th>Identity</th> <th>Created At</th> <th>Action</th> </tr> </thead> <tbody> {% for identity in identities.results %} <tr> {% url 'user-detail' identity.id as url %} <td>{{ identity.id }}</td> <td>{{ identity.created_at|get_date|date:"D d M Y H:i" }}</td> <td><a href="{{ url }}">view</a></td> </tr> {% endfor %} </tbody> </table> </div> </div> <!-- <div class="text-center"> <ul class="pagination"> <li> <a href="#" aria-label="Previous"> <span aria-hidden="true">&laquo;</span> </a> </li> <li class="active"><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> <li> <a href="#" aria-label="Next"> <span aria-hidden="true">&raquo;</span> </a> </li> </ul> </div> --> {% endblock %}
Java
#include "mex.h" #include <iostream> #include "drakeMexUtil.h" #include "RigidBodyManipulator.h" #include "math.h" using namespace Eigen; using namespace std; /* * mex interface for bullet collision detection * closest-distance for each body to all other bodies (~(NB^2-NB)/2 points) * * MATLAB signature: * * [xA,xB,normal,distance,idxA,idxB] = ... * collisionDetectmex( mex_model_ptr,allow_multiple_contacts, * active_collision_options); */ void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ) { //check number of arguments if (nrhs < 3) { mexErrMsgIdAndTxt("Drake:collisionDetectmex:NotEnoughInputs", "Usage: [xA,xB,normal,distance,idxA,idxB] = collisionDetectmex(mex_model_ptr, allow_multiple_contacts, active_collision_options)"); } //check argument types if (!mxIsClass(prhs[0], "DrakeMexPointer")) { mexErrMsgIdAndTxt("Drake:collisionDetectmex:InvalidInputType", "Expected a DrakeMexPointer for mex_model_ptr but got something else."); } if (!mxIsLogical(prhs[1])) { mexErrMsgIdAndTxt("Drake:collisionDetectmex:InvalidInputType", "Expected a boolean logic type for allow_multiple_collisions but got something else."); } if (!mxIsStruct(prhs[2])) { mexErrMsgIdAndTxt("Drake:collisionDetectmex:InvalidInputType", "Expected a struct type for active_collision_options but got something else."); } // first get the model_ptr back from matlab RigidBodyManipulator *model= (RigidBodyManipulator*) getDrakeMexPointer(prhs[0]); // Parse `active_collision_options` vector<int> active_bodies_idx; set<string> active_group_names; const mxArray* active_collision_options = prhs[2]; const mxArray* allow_multiple_contacts = prhs[1]; const mxArray* body_idx = mxGetField(active_collision_options, 0, "body_idx"); if (body_idx != NULL) { size_t n_active_bodies = static_cast<size_t>(mxGetNumberOfElements(body_idx)); active_bodies_idx.resize(n_active_bodies); memcpy(active_bodies_idx.data(),(int*) mxGetData(body_idx), sizeof(int)*n_active_bodies); transform(active_bodies_idx.begin(), active_bodies_idx.end(), active_bodies_idx.begin(), [](int i){return --i;}); } const mxArray* collision_groups = mxGetField(active_collision_options, 0, "collision_groups"); if (collision_groups != NULL) { size_t num_collision_groups = static_cast<size_t>(mxGetNumberOfElements(collision_groups)); for (size_t i = 0; i < num_collision_groups; i++) { const mxArray *ptr = mxGetCell(collision_groups, i); size_t buflen = static_cast<size_t>(mxGetN(ptr) * sizeof(mxChar)) + 1; char* str = (char*)mxMalloc(buflen); mxGetString(ptr, str, buflen); active_group_names.insert(str); mxFree(str); } } vector<int> bodyA_idx, bodyB_idx; MatrixXd ptsA, ptsB, normals, JA, JB, Jd; VectorXd dist; if (active_bodies_idx.size() > 0) { if (active_group_names.size() > 0) { model->collisionDetect(dist, normals, ptsA, ptsB, bodyA_idx, bodyB_idx, active_bodies_idx,active_group_names); } else { model->collisionDetect(dist, normals, ptsA, ptsB, bodyA_idx, bodyB_idx, active_bodies_idx); } } else { const bool multiple_contacts = mxIsLogicalScalarTrue(allow_multiple_contacts); if(multiple_contacts) { model->potentialCollisions(dist, normals, ptsA, ptsB, bodyA_idx, bodyB_idx); } else if (active_group_names.size() > 0) { model->collisionDetect(dist, normals, ptsA, ptsB, bodyA_idx, bodyB_idx, active_group_names); } else { model->collisionDetect(dist, normals, ptsA, ptsB, bodyA_idx, bodyB_idx); } } vector<int32_T> idxA(bodyA_idx.size()); transform(bodyA_idx.begin(), bodyA_idx.end(), idxA.begin(), [](int i){return ++i;}); vector<int32_T> idxB(bodyB_idx.size()); transform(bodyB_idx.begin(), bodyB_idx.end(), idxB.begin(), [](int i){return ++i;}); if (nlhs>0) { plhs[0] = mxCreateDoubleMatrix(3,static_cast<int>(ptsA.cols()),mxREAL); memcpy(mxGetPrSafe(plhs[0]),ptsA.data(),sizeof(double)*3*ptsA.cols()); } if (nlhs>1) { plhs[1] = mxCreateDoubleMatrix(3,static_cast<int>(ptsB.cols()),mxREAL); memcpy(mxGetPrSafe(plhs[1]),ptsB.data(),sizeof(double)*3*ptsB.cols()); } if (nlhs>2) { plhs[2] = mxCreateDoubleMatrix(3,static_cast<int>(normals.cols()),mxREAL); memcpy(mxGetPrSafe(plhs[2]),normals.data(),sizeof(double)*3*normals.cols()); } if (nlhs>3) { plhs[3] = mxCreateDoubleMatrix(1,static_cast<int>(dist.size()),mxREAL); memcpy(mxGetPrSafe(plhs[3]),dist.data(),sizeof(double)*dist.size()); } if (nlhs>4) { plhs[4] = mxCreateNumericMatrix(1,static_cast<int>(idxA.size()),mxINT32_CLASS,mxREAL); memcpy(mxGetData(plhs[4]),idxA.data(),sizeof(int32_T)*idxA.size()); } if (nlhs>5) { plhs[5] = mxCreateNumericMatrix(1,static_cast<int>(idxB.size()),mxINT32_CLASS,mxREAL); memcpy(mxGetData(plhs[5]),idxB.data(),sizeof(int32_T)*idxB.size()); } }
Java
#include "MutableValueSetterProxy.h" #include <jsi/jsi.h> #include "MutableValue.h" #include "SharedParent.h" using namespace facebook; namespace reanimated { void MutableValueSetterProxy::set( jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &newValue) { auto propName = name.utf8(rt); if (propName == "_value") { mutableValue->setValue(rt, newValue); } else if (propName == "_animation") { // TODO: assert to allow animation to be set from UI only if (mutableValue->animation.expired()) { mutableValue->animation = mutableValue->getWeakRef(rt); } *mutableValue->animation.lock() = jsi::Value(rt, newValue); } else if (propName == "value") { // you call `this.value` inside of value setter, we should throw } } jsi::Value MutableValueSetterProxy::get( jsi::Runtime &rt, const jsi::PropNameID &name) { auto propName = name.utf8(rt); if (propName == "value") { return mutableValue->getValue(rt); } else if (propName == "_value") { return mutableValue->getValue(rt); } else if (propName == "_animation") { if (mutableValue->animation.expired()) { mutableValue->animation = mutableValue->getWeakRef(rt); } return jsi::Value(rt, *mutableValue->animation.lock()); } return jsi::Value::undefined(); } } // namespace reanimated
Java
/* * Copyright (c) 2014, Ford Motor Company * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following * disclaimer in the documentation and/or other materials provided with the * distribution. * * Neither the name of the Ford Motor Company nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef TEST_COMPONENTS_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_MOCK_H_ #define TEST_COMPONENTS_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_MOCK_H_ #include <gmock/gmock.h> #include <string> #include "transport_manager/transport_manager.h" #include "transport_manager/transport_adapter/transport_adapter_event.h" namespace test { namespace components { namespace transport_manager_test { using ::transport_manager::DeviceHandle; using ::transport_manager::ConnectionUID; using ::transport_manager::transport_adapter::TransportAdapter; using ::transport_manager::TransportAdapterEvent; using ::transport_manager::TransportManagerListener; /* * MOCK implementation of ::transport_manager::TransportManager interface */ class TransportManagerMock: public ::transport_manager::TransportManager { public: MOCK_METHOD0(Init, int()); MOCK_METHOD0(Reinit, int()); MOCK_METHOD0(SearchDevices, int()); MOCK_METHOD1(ConnectDevice, int(const DeviceHandle &)); MOCK_METHOD1(DisconnectDevice, int(const DeviceHandle &)); MOCK_METHOD1(Disconnect, int(const ConnectionUID &)); MOCK_METHOD1(DisconnectForce, int(const ConnectionUID &)); MOCK_METHOD1(SendMessageToDevice, int(const ::protocol_handler::RawMessagePtr)); MOCK_METHOD1(ReceiveEventFromDevice, int(const TransportAdapterEvent&)); MOCK_METHOD1(AddTransportAdapter, int(TransportAdapter *)); MOCK_METHOD1(AddEventListener, int(TransportManagerListener *)); MOCK_METHOD0(Stop, int()); MOCK_METHOD1(RemoveDevice, int(const DeviceHandle &)); MOCK_CONST_METHOD1(Visibility, int(const bool &)); }; } // namespace transport_manager_test } // namespace components } // namespace test #endif // TEST_COMPONENTS_INCLUDE_TRANSPORT_MANAGER_TRANSPORT_MANAGER_MOCK_H_
Java
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>colour.models.cie_xyy Module &mdash; Colour 0.3.4 documentation</title> <link rel="stylesheet" href="_static/basic.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/bootswatch-3.1.0/colour/bootstrap.min.css" type="text/css" /> <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" /> <link rel="stylesheet" href="_static/styles.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: './', VERSION: '0.3.4', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script> <script type="text/javascript" src="_static/js/jquery-fix.js"></script> <script type="text/javascript" src="_static/bootstrap-3.1.0/js/bootstrap.min.js"></script> <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script> <link rel="top" title="Colour 0.3.4 documentation" href="index.html" /> <link rel="up" title="colour.models Package" href="colour.models.html" /> <link rel="next" title="colour.models.common Module" href="colour.models.common.html" /> <link rel="prev" title="colour.models.cie_uvw Module" href="colour.models.cie_uvw.html" /> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> <meta name="apple-mobile-web-app-capable" content="yes"> </head> <body> <div id="navbar" class="navbar navbar-default navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <!-- .btn-navbar is used as the toggle for collapsed navbar content --> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="index.html"><img src="_static/Colour_Logo_Icon_001.png"> Colour&nbsp;0.3</a> <!--<span class="navbar-text navbar-version pull-left"><b>0.3</b></span>--> </div> <div class="collapse navbar-collapse nav-collapse"> <ul class="nav navbar-nav"> <li class="divider-vertical"></li> <li><a href="https://www.colour-science.org">colour-science.org</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-life-ring">&nbsp;Documentation</i><b class="caret"></b></a> <ul class="dropdown-menu"> <li> <a href="api.html" class="fa fa-life-ring">&nbsp;API Reference</a> </li> <li> <a href="http://nbviewer.ipython.org/github/colour-science/colour-ipython/blob/master/notebooks/colour.ipynb', True)" class="fa fa-book">&nbsp;IPython Notebooks</a> </li> <li> <a href="https://www.colour-science.org/features.php" class="fa fa-lightbulb-o">&nbsp;Features</a> </li> <li> <a href="https://www.colour-science.org/contributing.php"><span class="fa fa-gears">&nbsp;Contributing</span></a> </li> </ul> </li> <li> <a href="colour.models.cie_uvw.html" title="Previous Chapter: colour.models.cie_uvw Module"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">&laquo; colour.models.ci...</span> </a> </li> <li> <a href="colour.models.common.html" title="Next Chapter: colour.models.common Module"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">colour.models.co... &raquo;</span> </a> </li> </ul> <form class="navbar-form navbar-right" action="search.html" method="get"> <div class="form-group"> <input type="text" name="q" class="form-control" placeholder="Search" /> </div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="section" id="module-colour.models.cie_xyy"> <span id="colour-models-cie-xyy-module"></span><h1>colour.models.cie_xyy Module<a class="headerlink" href="#module-colour.models.cie_xyy" title="Permalink to this headline">¶</a></h1> <div class="section" id="cie-xyy-colourspace"> <h2>CIE xyY Colourspace<a class="headerlink" href="#cie-xyy-colourspace" title="Permalink to this headline">¶</a></h2> <p>Defines the <em>CIE xyY</em> colourspace transformations:</p> <ul class="simple"> <li><a class="reference internal" href="#colour.models.cie_xyy.XYZ_to_xyY" title="colour.models.cie_xyy.XYZ_to_xyY"><tt class="xref py py-func docutils literal"><span class="pre">XYZ_to_xyY()</span></tt></a></li> <li><a class="reference internal" href="#colour.models.cie_xyy.xyY_to_XYZ" title="colour.models.cie_xyy.xyY_to_XYZ"><tt class="xref py py-func docutils literal"><span class="pre">xyY_to_XYZ()</span></tt></a></li> <li><a class="reference internal" href="#colour.models.cie_xyy.xy_to_XYZ" title="colour.models.cie_xyy.xy_to_XYZ"><tt class="xref py py-func docutils literal"><span class="pre">xy_to_XYZ()</span></tt></a></li> <li><a class="reference internal" href="#colour.models.cie_xyy.XYZ_to_xy" title="colour.models.cie_xyy.XYZ_to_xy"><tt class="xref py py-func docutils literal"><span class="pre">XYZ_to_xy()</span></tt></a></li> </ul> <div class="admonition seealso"> <p class="first admonition-title">See also</p> <p class="last"><a class="reference external" href="http://nbviewer.ipython.org/github/colour-science/colour-ipython/blob/master/notebooks/models/cie_xyy.ipynb">CIE xyY Colourspace IPython Notebook</a></p> </div> <p class="rubric">References</p> <table class="docutils footnote" frame="void" id="id1" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> <tr><td class="label">[1]</td><td>Wikipedia. (n.d.). CIE 1931 color space. Retrieved February 24, 2014, from <a class="reference external" href="http://en.wikipedia.org/wiki/CIE_1931_color_space">http://en.wikipedia.org/wiki/CIE_1931_color_space</a></td></tr> </tbody> </table> <dl class="function"> <dt id="colour.models.cie_xyy.XYZ_to_xyY"> <tt class="descclassname">colour.models.cie_xyy.</tt><tt class="descname">XYZ_to_xyY</tt><big>(</big><em>XYZ</em>, <em>illuminant=(0.34567</em>, <em>0.3585)</em><big>)</big><a class="reference internal" href="_modules/colour/models/cie_xyy.html#XYZ_to_xyY"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#colour.models.cie_xyy.XYZ_to_xyY" title="Permalink to this definition">¶</a></dt> <dd><p>Converts from <em>CIE XYZ</em> colourspace to <em>CIE xyY</em> colourspace and reference <em>illuminant</em>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>XYZ</strong> (<em>array_like, (3,)</em>) &#8211; <em>CIE XYZ</em> colourspace matrix.</li> <li><strong>illuminant</strong> (<em>array_like, optional</em>) &#8211; Reference <em>illuminant</em> chromaticity coordinates.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><em>CIE xyY</em> colourspace matrix.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">ndarray, (3,)</p> </td> </tr> </tbody> </table> <p class="rubric">Notes</p> <ul class="simple"> <li>Input <em>CIE XYZ</em> colourspace matrix is in domain [0, 1].</li> <li>Output <em>CIE xyY</em> colourspace matrix is in domain [0, 1].</li> </ul> <p class="rubric">References</p> <table class="docutils footnote" frame="void" id="id2" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> <tr><td class="label">[2]</td><td>Lindbloom, B. (2003). XYZ to xyY. Retrieved February 24, 2014, from <a class="reference external" href="http://www.brucelindbloom.com/Eqn_XYZ_to_xyY.html">http://www.brucelindbloom.com/Eqn_XYZ_to_xyY.html</a></td></tr> </tbody> </table> <p class="rubric">Examples</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">XYZ</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.07049534</span><span class="p">,</span> <span class="mf">0.1008</span><span class="p">,</span> <span class="mf">0.09558313</span><span class="p">])</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">XYZ_to_xyY</span><span class="p">(</span><span class="n">XYZ</span><span class="p">)</span> <span class="go">array([ 0.2641477..., 0.3777000..., 0.1008 ])</span> </pre></div> </div> </dd></dl> <dl class="function"> <dt id="colour.models.cie_xyy.xyY_to_XYZ"> <tt class="descclassname">colour.models.cie_xyy.</tt><tt class="descname">xyY_to_XYZ</tt><big>(</big><em>xyY</em><big>)</big><a class="reference internal" href="_modules/colour/models/cie_xyy.html#xyY_to_XYZ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#colour.models.cie_xyy.xyY_to_XYZ" title="Permalink to this definition">¶</a></dt> <dd><p>Converts from <em>CIE xyY</em> colourspace to <em>CIE XYZ</em> colourspace.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>xyY</strong> (<em>array_like, (3,)</em>) &#8211; <em>CIE xyY</em> colourspace matrix.</td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><em>CIE XYZ</em> colourspace matrix.</td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">ndarray, (3,)</td> </tr> </tbody> </table> <p class="rubric">Notes</p> <ul class="simple"> <li>Input <em>CIE xyY</em> colourspace matrix is in domain [0, 1].</li> <li>Output <em>CIE XYZ</em> colourspace matrix is in domain [0, 1].</li> </ul> <p class="rubric">References</p> <table class="docutils footnote" frame="void" id="id3" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> <tr><td class="label">[3]</td><td>Lindbloom, B. (2009). xyY to XYZ. Retrieved February 24, 2014, from <a class="reference external" href="http://www.brucelindbloom.com/Eqn_xyY_to_XYZ.html">http://www.brucelindbloom.com/Eqn_xyY_to_XYZ.html</a></td></tr> </tbody> </table> <p class="rubric">Examples</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">xyY</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.26414772</span><span class="p">,</span> <span class="mf">0.37770001</span><span class="p">,</span> <span class="mf">0.1008</span><span class="p">])</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">xyY_to_XYZ</span><span class="p">(</span><span class="n">xyY</span><span class="p">)</span> <span class="go">array([ 0.0704953..., 0.1008 , 0.0955831...])</span> </pre></div> </div> </dd></dl> <dl class="function"> <dt id="colour.models.cie_xyy.xy_to_XYZ"> <tt class="descclassname">colour.models.cie_xyy.</tt><tt class="descname">xy_to_XYZ</tt><big>(</big><em>xy</em><big>)</big><a class="reference internal" href="_modules/colour/models/cie_xyy.html#xy_to_XYZ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#colour.models.cie_xyy.xy_to_XYZ" title="Permalink to this definition">¶</a></dt> <dd><p>Returns the <em>CIE XYZ</em> colourspace matrix from given <em>xy</em> chromaticity coordinates.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>xy</strong> (<em>array_like</em>) &#8211; <em>xy</em> chromaticity coordinates.</td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><em>CIE XYZ</em> colourspace matrix.</td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">ndarray, (3,)</td> </tr> </tbody> </table> <p class="rubric">Notes</p> <ul class="simple"> <li>Input <em>xy</em> chromaticity coordinates are in domain [0, 1].</li> <li>Output <em>CIE XYZ</em> colourspace matrix is in domain [0, 1].</li> </ul> <p class="rubric">Examples</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">xy</span> <span class="o">=</span> <span class="p">(</span><span class="mf">0.26414772236966133</span><span class="p">,</span> <span class="mf">0.37770000704815188</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">xy_to_XYZ</span><span class="p">(</span><span class="n">xy</span><span class="p">)</span> <span class="go">array([ 0.6993585..., 1. , 0.9482453...])</span> </pre></div> </div> </dd></dl> <dl class="function"> <dt id="colour.models.cie_xyy.XYZ_to_xy"> <tt class="descclassname">colour.models.cie_xyy.</tt><tt class="descname">XYZ_to_xy</tt><big>(</big><em>XYZ</em>, <em>illuminant=(0.34567</em>, <em>0.3585)</em><big>)</big><a class="reference internal" href="_modules/colour/models/cie_xyy.html#XYZ_to_xy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#colour.models.cie_xyy.XYZ_to_xy" title="Permalink to this definition">¶</a></dt> <dd><p>Returns the <em>xy</em> chromaticity coordinates from given <em>CIE XYZ</em> colourspace matrix.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>XYZ</strong> (<em>array_like, (3,)</em>) &#8211; <em>CIE XYZ</em> colourspace matrix.</li> <li><strong>illuminant</strong> (<em>array_like, optional</em>) &#8211; Reference <em>illuminant</em> chromaticity coordinates.</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><em>xy</em> chromaticity coordinates.</p> </td> </tr> <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">tuple</p> </td> </tr> </tbody> </table> <p class="rubric">Notes</p> <ul class="simple"> <li>Input <em>CIE XYZ</em> colourspace matrix is in domain [0, 1].</li> <li>Output <em>xy</em> chromaticity coordinates are in domain [0, 1].</li> </ul> <p class="rubric">Examples</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">XYZ</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.07049534</span><span class="p">,</span> <span class="mf">0.1008</span><span class="p">,</span> <span class="mf">0.09558313</span><span class="p">])</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">XYZ_to_xy</span><span class="p">(</span><span class="n">XYZ</span><span class="p">)</span> <span class="go">(0.2641477..., 0.3777000...)</span> </pre></div> </div> </dd></dl> </div> </div> </div> </div> </div> <footer class="footer"> <div class="container"> <p class="pull-right"> <a href="#">Back to top</a> </p> <p> &copy; Copyright 2013 - 2015, Colour Developers.<br/> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.2.<br/> </p> </div> </footer> </body> </html>
Java
Because the ```gpu_test_expectations``` directory is based on parts of Chromium's ```gpu/config`` directory, we want to keep a patch of the changes added to make it compile with ANGLE. This will allow us to merge Chromium changes easily in our ```gpu_test_expectations```. In order to make a change to this directory, do the following: * copy the directory somewhere like in ```gpu_test_expectations_reverted``` * in ```gpu_test_expectations_reverted``` run ```patch -p 1 -R < angle-mods.patch``` * do your changes in ```gpu_test_expectations``` * delete angle-mods.path in both directories * run ```diff -rupN gpu_test_expectations_reverted gpu_test_expectations > angle-mods.patch``` * copy ```angle-mods.patch``` in ```gpu_test_expectations``` How to update from Chromium: * ```git apply -R angle-mods.patch```, ```git add . -u```, ```git commit``` * Copy over Chromium files, ```git add . -u```, ```git commit``` * ```git revert HEAD~2``` * ```rm angle-mods.patch``` * ```git diff HEAD~1 (`)ls(`) > angle-mods.patch```,```git add angle-mods.patch```, ```git commit --amend``` * ```git rebase -i``` to squash the three patches into one.
Java
local Dta = select(2, ...) Dta.Lang.English = {} local English = Dta.Lang.English ---------------------------------------- --Help ---------------------------------------- ---Intro------------------------------------------------------------------ English.Intro = {} English.Intro.Label = "Intro" English.Intro.Text1 = "\ Hello Dimensioneers!\ \ This Addon is the continuation of Dimension Tools, originally developed\ by Kikimora with the support of the Rift Dream Dimensions team.\ And Dimension Tools is an advancement of Dimension Toolbox by Arkzy.\ \ The following is a summary of the core features:\ \ <u>Tinker Tools Features:</u>\ - Compact user interface giving you more screen space when building dimensions.\ All the tools can be brought up individually with the buttons provided in\ the main window.\ \ - Move, scale and rotate hundreds of items at once precisely in various modes.\ (Though you must keep in mind that the more items you modify, the longer it\ takes to finish processing it.)\ \ - The functionality of the Copy/Paste tool ranges from transfering selected values\ between items with optional offset to cloning whole groups of items and placing\ multiple copies in your dimension directly from your bags and/or bank.\ \ - With the Load/Save feature you can choose between loading one of the\ default sets or your own saved sets. And for convenience you can place\ multiple copies of a saved set at once with an offset on the X, Y or X axis.\ \ - The Import/Export feature allows you to transfer your saved sets using a global file\ or via text copy and paste. Also supports importing Toolbox sets in text format.\ \ Thanks for all the support from the dimension community,\ and have fun building your dreams!" English.Intro.Text2 = "<u>Change Log</u>\ For the changes please refer to the included Changelog.txt file.\ \ For a more detailed list of changes, you can also check the commit log at\ https://github.com/Lynx3d/dimension_tools/commits/master" English.Intro.Text3 = "" ---Main------------------------------------------------------------------- English.Main = {} English.Main.Label = "Main" English.Main.Text1 = "\ The tool button is where it all starts. Left-click it to open the main window,\ right-click it to drag it. The main window holds the basic information about\ the selected items along with the buttons to open up all the individual tools.\ \ Tinker Tools can only be opened inside of dimensions, unless you override\ this with the '/tt force' chat command." English.Main.Text2 = "\ The item icon has a small 'x'-button to clear the selection, and a right-click\ on the icon will set a waypoint on the minimap.\ \ <u>Window Toggle Buttons:</u>\ - ?: Opens up this help window.\ - Move: A tool to move items in various modes.\ - Rotate: A tool to rotate items in various modes.\ - Scale: A tool to scale items in various modes.\ - Offset Calc.: A tool to determine offset values for proper item alignment.\ - Copy / Paste: A tool to copy and paste items with many options.\ - Load / Save: A tool to load and save structures. Also links to Import / Export.\ - Tribal Magic: A tool that allows you to move more freely.\ - Alfiebet: A text creation tool using standard building blocks.\ - Reskin: A tool to replace building blocks with a different appearance." English.Main.Text3 = "" ---Move------------------------------------------------------------------- English.Move = {} English.Move.Label = "Move" English.Move.Text1 = "\ The Move Window is where you modify the positions of the selected items." English.Move.Text2 = "\ <u>Descriptions:</u>\ - X/Y/Z: Specifies the coordinates for the X/Y/Z axis.\ Empty fields will leave the associated axis unaffected.\ - Absolute: Moves the item(s) to the coordinates set in X,Y,Z.\ - Relative: Moves the item(s) with an offset from current position by the\ numbers set in X,Y,Z.\ - As Group: Treats the whole selection as one object with the selection center\ as position; only available in absolute mode.\ - Local Axes: Moves each item along its local axes. Local axis means the item's\ rotation is applied to the global axis, creating a coordinate system that rotates\ with the object. Since the item itself defines the origin, this is only available\ in relative mode.\ - Move: Starts the moving of the item(s).\ - Reset: Resets the item(s) to your current position." English.Move.Text3 = "" ---Rotate----------------------------------------------------------------- English.Rotate = {} English.Rotate.Label = "Rotate" English.Rotate.Text1 = "\ The Rotate Window is where you modify the Rotation of the selected item(s)." English.Rotate.Text2 = "\ <u>Descriptions:</u>\ - Pitch: Specifies the rotation about the X axis.\ - Yaw: Specifies the rotation about the Y axis.\ - Roll: Specifies the rotation about the Z axis.\ - Absolute: Sets the item(s) rotation to the exact numbers you put in Pitch,\ Yaw and Roll.\ NOTE: While empty fields will use the current values, there is always more\ than one way to represent the same rotation. Rift may convert the angles if\ your input exceeds certain boundaries, and hence chance all 3 values, which\ may greatly confuse you on subsequent rotation adjustments. So it is highly\ recommended to not leave fields empty in absolute mode.\ - Relative: Rotates the item(s) with the numbers you set in Yaw, Pitch and\ Roll from the current rotation. So if current rotation is 30 degrees Yaw\ and you put 20 degrees in the Yaw box it will end up having a rotation\ of 50 degrees.\ - As Group: Treats the whole selection as one object. Note that since selections\ are temporary, there is no way to save a current rotation for the group.\ This has two consequences: This mode is only available in relative mode, and\ the rotation happens around the global axis.\ Note that you can rotate a single item around global axis too this way.\ - Rotate: Starts the rotation of the item(s).\ - Reset: Resets the item(s) Pitch, Yaw and Roll to 0 degrees." English.Rotate.Text3 = "" ---Scale------------------------------------------------------------------ English.Scale = {} English.Scale.Label = "Scale" English.Scale.Text1 = "\ The Scale Window is where you modify the Scale of the selected item(s)." English.Scale.Text2 = "\ <u>Descriptions:</u>\ - Scale: Specifies the scale factor for the selected item(s).\ - Absolute: Sets the scale of the item(s) to the exact number you put in.\ - Relative: Sets the scale of the item(s) to the current scale multiplied by\ the number you put in.\ - As Group: Treats the whole selection as one object. Note that since selections\ are temporary, there is no way to determine a current scale of the group,\ so it is only available in relative mode.\ Warning: Items have diverse scale limitations. If you exceed those, your group\ will fall apart, so to speak, because this mode also has to move items.\ - Scale: Starts the scaling of the item(s).\ - Reset: Resets the item(s) scale to 1." English.Scale.Text3 = "" ---Copy and Paste--------------------------------------------------------- English.CopyandPaste = {} English.CopyandPaste.Label = "Copy and Paste" English.CopyandPaste.Text1 = "\ The Copy / Paste Tool is pretty versatile, and behaves a bit different\ depending on what you do.\ When you copy a single item, you can paste its values to any other item,\ the item type gets ignored in this case, and individual values can be excluded.\ But the real power lies in the ability to copy a group of items and paste an\ array with incremental offsets, using items from your inventory." English.CopyandPaste.Text2 = "\ You can disable and enable any of the offsets by clicking the selection box\ in front of the text fields. When pasting to a single selected object, this\ also controls which properties are transferred to the selected item.\ \ <u>Descriptions:</u>\ - Offset X, Y, Z: Sets the offset for the X, Y, Z axis for the item(s) you\ are going to paste the clipboard to.\ - Offset Pitch, Yaw, Roll: Sets the rotation offset for the Pitch, Yaw,\ Roll axis for the item(s) you are going to paste the clipboard to.\ For single items, the values are simply added to the original values.\ For item groups or when a pivot is used, the items get transformed using the\ global coordinate axis.\ - Offset Scale: Sets the scale change for the paste. For example, 0.2 will make\ the placed copy 20% larger, and -0.2 consequently 20% smaller.\ - Offset multiple items: Makes it possible to paste an array by iteratively adding\ the offsets to the values of the previously placed copy. This accepts either\ a count or a range in the form first:last. So 5 is equivalent to 1:5. First and\ last may be zero or even negative. This way you can include the original position\ with 0:5, extend a previously pasted array like 6:10 for 5 more copies, inverse\ the direction with -1:-5 etc.\ - Flicker reduction: This adds a small quasi-random offset to each placed copy to\ prevent visual flickering from overlapping coplanar parts (Z-fighting).\ The input field lets you adjust the amplitude of the offset sequence.\ - Custom Pivot: This causes rotation and scaling to be calculated relative to the\ point you picked (see below for details).\ - Use New Items: Activates the possibility to place new items from your bags or\ bank into your dimension. Your inventory will be scanned to ensure you have\ enough items before the pasting begins\ - Copy: Copies the stats of the items you have selected to clipboard.\ - Paste: Pastes the clipboard according to the settings you made.\ This may take a while when placing many new items.\ \ Depending on the settings, additional controls become available, as seen below:" English.CopyandPaste.Text3 = "\ <u>Descriptions of additional options:</u>\ - Nr. of Copies: This will be showing up when Offset multiple items is activated.\ - Pick: This button is available when Custom Pivot is active and lets you record the\ position of your current selection. This lets you for example build a spiral\ staircase around a specific center point.\ The pivot is kept until you pick a new one (or leave the dimension), and doesn't\ change if you move or remove the item(s) afterwards.\ - Bags: Controls whether to include items from your bags to place new items.\ - Bank: Controls whether to include items from your bank (bags and vaults) to\ place new items. Note that this has limitations when you don't have\ actual bank access." ---Load and Save---------------------------------------------------------- English.LoadandSave = {} English.LoadandSave.Label = "Load and Save" English.LoadandSave.Text1 = "\ The Load / Save Sets window is all about saving the sets you created to be\ able to load them up on other places in your dimension or in other dimensions\ you have." English.LoadandSave.Text2 = "\ <u>Descriptions:</u>\ - Name (Textbox): Here you set the name for the set you want to save.\ - Save Set: Saves the set to file.\ - Import/Export: Opens the Import/Export dialog (see next help topic)\ \ - Default Sets: Gives you the possibility to load the default sets provided\ by the RiftDreamDimensions team.\ These sets are tools created to aid you in your creativity.\ \ For a detailed guide on how to use these tools you can go to\ http://RiftDreamDimensions.com and take a look at the\ Dimension Tools PDF file.\ \ - Saved Sets: Gives you the possibility to load your own made sets into your\ Dimensions.\ - Tbx Sets: Gives you the possibility to load your old Toolbox Sets, explanation\ on how that works you find later in this help.\ \ - Search: Filters the drop-down below, refreshes when hitting 'return'.\ - Name (Drop-down): A list of all available set. Depending on if you have\ chosen Default Sets or Saved Sets the drop box will go to different lists.\ - Load Set: Loads the selected set into your dimension using items you have\ selected in your dimension or using items from your bags.\ - Print Materials: Print out a list of items needed for the selected set.\ - Delete Set: Removes the selected set from your saved list (only Saved Sets).\ - To Clipboard: This copies the set to the Copy&Paste clipboard, so you can paste\ it with that tool. This gives you more options, for example pasting multiple\ copies, but also allows using the Reskin tool to change materials before pasting.\ - Use New Items: This places new items from your inventory. Otherwise you need\ to have the required items placed and selected.\ - Load at original location: If this is selected, the set will be loaded with\ the coordinates it was originally saved with. Otherwise it will be loaded close\ to your current position, or if enabled, at your reference point.\ Only advisable when dimension keys of load and save match.\ \ - Use Reference Point: This option allows for more control over the placement of\ loaded sets. When saving a set, the picked point is simply saved along with the\ items of the set. When you later load this set, the set will be moved so that\ the saved reference point aligns with your current pick. If the set has no\ reference point, the center point of the set will be used instead.\ - Pick: This sets your current selection center as reference point." English.LoadandSave.Text3 = "\ Tbx Sets is somewhat special. By default that set is empty, but for old Dimension\ Toolbox users this is a way to get your sets that you made with Dimension\ Toolbox to work within Tinker Tools as well.\ \ To get your old sets loaded into Dimension Tools you need to do the following:\ 1: Locate the tbx.lua File, found under:\ /Users/[YourName]/Documents/RIFT/Interface/Saved/[YourRiftAccount]\ /SavedVariables\ 2: Copy the file txb.lua into the same directory.\ 3: Rename the new file to tbx_Import.lua\ 4: Now start up rift and you should have all your old Dimension Toolbox Sets\ there to load up and place in your dimensions.\ \ Be aware you will not be able to remove any of the sets loaded under Tbx Sets,\ so I highly recommend that before you copy and rename the file go to Dimension\ Toolbox and delete all sets you don't want to use in Dimension Tools." ---Import and Export------------------------------------------------------ English.ImportandExport = {} English.ImportandExport.Label = "Import and Export" English.ImportandExport.Text1 = "\ The Import / Export Sets window is all about sharing your sets with other\ friends in the game.\ There are two ways to exchange sets, with the Dimension Tools export addon\ and by converting it to/from text you can copy/paste using the system clipboard.\ \ The Dimension Tools export is an embedded addon that uses saved variabls to\ exchange the data, the file will be named Dimtools_Export.lua\ Usually you will find that file at:\ C:/Users/%USERNAME%/My Documents/RIFT/Interface/Saved/SavedVariables\ Note that the default path depends on the Windows version and locale, and\ furthermore depends on the DocumentsDirectory variable in rift.cfg.\ But generally, Saved/ resides in the same directory as your Addons/ directory,\ which can be opened from Rift's addons configuration dialog." English.ImportandExport.Text2 = "\ <u>Descriptions:</u>\ - Saved Sets: Sets the source for sets to your Tinker Tools saved sets.\ - Tbx Sets: Sets the source to your Toolbox sets that were auto-imported.\ - Name (First drop-down): Here you can select any of your own saved sets to\ be exported.\ - Export: Exports the selected set to the Dimtools_Export.lua file.\ - Export Text: Exports the selected set to the text box at the bottom.\ - Name (Second drop-down): Here you can select any of the sets saved in the\ export File.\ - New Name: Specify the name this set will have. Optional for Dimension Tools\ Import, mandatory for Text Import.\ - Import: Imports the selected set to your saved sets list and then removes\ the set from the export file.\ - Import Text: Imports the text from the text box at the bottom to your saved\ sets list. Also accepts the Dimension Toolbox format (auto-detected).\ \ When using Dimension Tools file export, keep in mind that addon data is not\ written to disk until addons are unloaded, so either logout or use the /reloadui\ chat command to save the data to Dimtools_Export.lua\ \ When you import from a foreign Dimtools_Export.lua file, you must not be logged in\ with your character when you copy it into the SavedVariables directory, otherwise\ it will be overwritten before you can import anything from it." English.ImportandExport.Text3 = "" ---Tribal Magic----------------------------------------------------------- English.TribalMagic = {} English.TribalMagic.Label = "Tribal Magic" English.TribalMagic.Text1 = "\ Tribal Magic is based on the Magic Carpet addon made by AladdinRift.\ Instead of an Ochre Rug it uses the smaller Round Tribal Table to give you\ more room to look around without seeing the edges of the item you fly on." English.TribalMagic.Text2 = "\ <u>Descriptions:</u>\ - Place: places the Round Tribal Table in your dimension for flying.\ - Pick up: Picks up the Round Tribal Table from your dimension.\ - Slider: Changes the angle of the Round Tribal Table.\ 0: Levels out the Round Tribal Table, so you can move around on the altitude\ you currently are.\ +1 to +4: The higher the number the more you will go upwards as you move.\ -1 to -4: The lower the number the more you will go downwards as you move.\ The slider can also be moved with the mouse wheel when the cursor is above it." English.TribalMagic.Text3 = "" ---Reskin----------------------------------------------------------------- English.Reskin = {} English.Reskin.Label = "Reskin" English.Reskin.Text1 = "\ The Reskin Tool replaces building blocks of one surface appearance (skin)\ with another skin of your choice.\ It works on the Copy / Paste clipboard, so before you can start, you need\ to copy something first. Note that you can also copy a saved set to the\ clipboard.\ When you're finished, you can paste the reskinned clipboard. You'll probably\ want to activate the 'Use New Items' option for this, and pick up the original\ structure if you're pasting at the original location." English.Reskin.Text2 = "\ <u>Descriptions:</u>\ - Old Skin: The skin you want to replace.\ - New Skin: The skin that will replace the old one.\ - Checkboxes: Select the building block shapes you want to be included.\ - Apply: Applies the changes to the clipboard and prints a summary." English.Reskin.Text3 = "" ---Afterword-------------------------------------------------------------- English.Afterword = {} English.Afterword.Label = "Afterword" English.Afterword.Text1 = "\ Many thanks to the Rift Community for supporting me. Your feedback\ and in-game donations have helped me a lot to stay motivated and continue\ from where Kikimora left Dimension Tools at.\ \ A lot of work was put into refactoring the old code, effectively making\ this a whole new addon.\ \ I hope you will enjoy the addon with its signifficant interface changes\ and keep making a lot of wonderful creations with it.\ For questions, errors, suggestions or other information about the addon you\ want to share, have a look at the Dimensions section of the Rift forums.\ \ Special Thanks:\ AladdinRift, for allowing to integrate his code from Magic Carpet into\ Dimension Tools.\ \ The Translators:\ Aeryle, French translations.\ Thanks for continuing to work on the translation for this remake of the\ Dimension Tools addon.\ \ A little word from Aeryle:\ It was a pleasure for me to translate this Add-on in French.\ I hope the French Dimension community will enjoy it and i hope this\ translation will allow them to use this add-on more easily!" English.Afterword.Text2 = "" English.Afterword.Text3 = "" ---Offset Calc.----------------------------------------------------------- English.OffsetCalc = {} English.OffsetCalc.Label = "Offset Calc." English.OffsetCalc.Text1 = "\ The Offset Calculator is a tool you can use to see what offset is need to\ place building blocks seamlessly against each other.\ This tool has come to life because of questions about how you determine the\ offset of a building block." English.OffsetCalc.Text2 = "\ - Shape: Here you choose the type of item you want the offset for.\ Supported shapes: Pole, Square, Cube, Plank, Rectangle and Floors.\ - Orientation: Here you choose the orientation of an item.\ Supported are all 6 possible +/- 90° rotation combinations.\ For arbitrarily rotated items, Transformed X, Y and Z Offset give the\ vector that represents the item's local X, Y or Z vector respectively.\ A special case is 'Selection Delta', this does not work on the\ shape of an item, but calculates the differences between two\ selected items, and hence ignores the Shape and Scale setting.\ - Scale: Here you set the scale of the item.\ - Multiplier: Optional input. If present, the result will be multiplied\ by this value.\ - Calculate: Calculates the offsets for you.\ - X: The offset on the X axis.\ - Y: The offset on the Y axis.\ - Z: The offset on the Z axis.\ - Detect: This tries to detect all parameters from the item selection." English.OffsetCalc.Text3 = "" ---Alfiebet----------------------------------------------------------- English.Alfiebet = {} English.Alfiebet.Label = "Alfiebet" English.Alfiebet.Text1 = "\ Going through allot of dimensions over time one thing you see a lot, people\ writing words using different items. Some are really clear others are really\ bright using light sources to make them. But one thing they all have in common,\ people want to say something to their dimension visitors. That is why we as\ the RiftDreamDimensions team came up with the idea to make a word processor\ in Dimension Tools. And after a lot of thinking and work done by the\ RiftDreamDimensions team creating fonts for it we managed to get this tool\ working for you all to enjoy." English.Alfiebet.Text2 = "\ - Word: This is where you type in the word you want in your dimension.\ - The tool only works with letters A to Z.\ - Font: This is where you choose what font you like to use.\ - Size: Here you can choose the size of the font.\ - Skin: Here you can choose what type of skin you want to give your word.\ - Place Horizontal: Writes the word horizontal along the X axis.\ - Place Vertical: Writes the word vertical along the Y axis.\ - Load Word: places the word into your dimension.\ - Print Materials: Prints a list of items you need in your chat window.\ This list will adjust itself depending on what skin you choose." English.Alfiebet.Text3 = "" English.Selection = {} English.Selection.Label = "Selection" English.Selection.Text1 = "\ The Selection tool mainly helps you saving and restoring the selection state\ of placed items. Some tool actions also automatically save a set of the items\ they used. Note that item identifiers are only valid for one building session.\ If the dimension gets unloaded (when the last player leaves), IDs become invalid\ and new ones are generated when you enter again. Consequently these sets are not\ saved when you log out, they are only temporary." English.Selection.Text2 = "\ - Save Set: Saves your current selection\ - Load Set: Selects all items in the set. Currently selected items will remain\ selected so you can combine selections as you please.\ - Name (drop-down): Lists all saved sets, including automatically created ones.\ Automatically saved are your last copy selection, and the items placed by your\ last paste and set loading.\ - Delete Set: Delete a saved set.\ - Invert: This inverts the selection state of all items, i.e. what's currently\ selected will be unselected, and what's unselected will be selected. So if\ nothing is selected, this will attempt to select everything (selecting requires\ items to be in vewing range too).\ *WARNING*: Attempting to modify too many items with Rift's own tools will cause\ disconnects, losing all temporary data of your building session like TT's clipboard\ and selection sets.\ - Pick Up: This does the same thing as Rift's Pick Up button. But this function\ can handle large item counts without disconnect, you're only limited by the\ bag space you have." English.Selection.Text3 = "" ---------------------------------------- --Buttons ---------------------------------------- English.Buttons = {} English.Buttons.MoveWindow = "Move" English.Buttons.RotateWindow = "Rotate" English.Buttons.ScaleWindow = "Scale" English.Buttons.CopyPaste = "Copy / Paste" English.Buttons.LoadSave = "Load / Save" English.Buttons.ImportExport = "Import / Export" English.Buttons.TribalMagic = "Tribal Magic" English.Buttons.OffsetCalc = "Offset Calc." English.Buttons.Reskin = "Reskin" English.Buttons.Selection = "Selection" English.Buttons.Copy = "Copy" English.Buttons.Paste = "Paste" English.Buttons.Pick = "Pick" English.Buttons.Import = "Import" English.Buttons.ImportText = "Import Text" English.Buttons.Export = "Export" English.Buttons.ExportText = "Export Text" English.Buttons.Place = "Place" English.Buttons.PickUp = "Pick Up" English.Buttons.SaveSet = "Save Set" English.Buttons.LoadSet = "Load Set" English.Buttons.RemoveSet = "Delete Set" English.Buttons.PrintMaterials = "Material List" English.Buttons.ToClipboard = "To Clipboard" English.Buttons.Move = "Move" English.Buttons.Reset = "Reset" English.Buttons.Rotate = "Rotate" English.Buttons.Scale = "Scale" English.Buttons.Calculate = "Calculate" English.Buttons.Detect = "Detect" English.Buttons.Transfer = "Transfer" English.Buttons.LoadWord = "Load Word" English.Buttons.Yes = "Yes" English.Buttons.No = "No" English.Buttons.OK = "OK" English.Buttons.Cancel = "CANCEL" English.Buttons.Apply = "Apply" English.Buttons.More = "More..." English.Buttons.Less = "Less..." English.Buttons.InvertSelection = "Invert" ---------------------------------------- --Menus ---------------------------------------- English.Menus = {} English.Menus.WindowStyle = { "Default", "Borderless" } English.Menus.ItemType = { "Cubes", "Plank", "Pole", "Rectangle", "Square", "Floor", "Hall Floor", "Large Floor" } English.Menus.Orientation = { "Default", "Pitch 90", "Yaw 90", "Roll 90", "Pitch & Yaw 90", "Pitch & Roll 90", "Selection Delta", "Transformed X Offset", "Transformed Y Offset", "Transformed Z Offset" } ---------------------------------------- --Titles ---------------------------------------- English.Titles = {} English.Titles.Main = "Tinker Tools" English.Titles.Move = "Move" English.Titles.Rotate = "Rotate" English.Titles.Scale = "Scale" English.Titles.CopyPaste = "Copy / Paste Items" English.Titles.LoadSave = "Load / Save Sets" English.Titles.ImportExport = "Import / Export Sets" English.Titles.TribalMagic = "Tribal Magic" English.Titles.OffsetCalc = "Offset Calculation" English.Titles.Help = "Tinker Tools Help" English.Titles.Settings = "Settings" English.Titles.TransferValues = "Transfer Values to:" English.Titles.Reskin = "Replace Skins" English.Titles.Selection = "Selection" English.Titles.MaterialList = "Material List" ---------------------------------------- --Text ---------------------------------------- English.Text = {} English.Text.Yaw = "Yaw" English.Text.Pitch = "Pitch" English.Text.Roll = "Roll" English.Text.Scale = "Scale" English.Text.NothingSelected = "Nothing selected" English.Text.NrSelectItems = "Nr. of selected items:" English.Text.MultiSelectItems = "%d items selected" English.Text.Offset = "Offset" English.Text.OffsetMultiItems = "Offset multiple items" English.Text.FlickerReduce = "Flicker Reduction" English.Text.UseNewItems = "Use New Items" English.Text.SelectionPivot = "Custom Pivot" English.Text.NrItems = "Nr. of Copies" English.Text.Bags = "Bags" English.Text.BankBags = "Bank" English.Text.Vaults = "Vaults" English.Text.DefaultSets = "Default Sets" English.Text.SavedSets = "Saved Sets" English.Text.TbxSets = "Tbx Sets" English.Text.Name = "Name" English.Text.Search = "Search" English.Text.LoadOrigionalLocation = "Load at original location" English.Text.UseRefPoint = "Use reference point" English.Text.Absolute = "Absolute" English.Text.Relative = "Relative" English.Text.MoveAsGroup = "As group" English.Text.LocalAxes = "Local Axes" English.Text.Type = "Shape" English.Text.Orientation = "Orientation" English.Text.Word = "Word" English.Text.Font = "Font" English.Text.Size = "Size" English.Text.Skin = "Skin" English.Text.Horizontal = "Place Horizontal" English.Text.Vertical = "Place Vertical" English.Text.ConsoleMessages = "Console Messages" English.Text.WindowStyle = "Window Style" English.Text.RestoreTools = "Remember opened Tools when closing\nMain Window" English.Text.NotIdleNotification = "Previous operation has not finished yet.\nAbort currently running operation now?" English.Text.ConfirmDeleteSet = "Delete item set '%s'?" English.Text.ConfirmOverwrite = "The set '%s' already exists.\nOverwrite this set?" English.Text.ConfirmUsePosition = "The original position of this set is %.1fm away.\nContinue operation?" English.Text.ConfirmPickup = "Are you sure you want to pick up all selected items?" English.Text.ConfirmInvSelect = "Handling too many items may cause disconnects.\nSelect %d items?" English.Text.Invert = "Inverse Direction" English.Text.OldSkin = "Old Skin" English.Text.NewSkin = "New Skin" English.Text.Tile = "Square" English.Text.Rectangle = "Rectangle" English.Text.Triangle = "Triangle" English.Text.Plank = "Plank" English.Text.Cube = "Cube" English.Text.Sphere = "Sphere" English.Text.Pole = "Pole" English.Text.Disc = "Disc" English.Text.NewName = "New Name" English.Text.Category = "Category" English.Text.AnySkin = "<Any Skin>" English.Text.Multiplier = "Multiplier" ---------------------------------------- --Prints ---------------------------------------- English.Prints = {} --Main English.Prints.DimensionOnly = "This addon is intended for use in Dimensions only." English.Prints.ProcessFinished = "Processing Finished." English.Prints.SetFinished = "Item set \"%s\" loaded and selected." English.Prints.PasteFinished = "All items are placed and selected." English.Prints.WordFinished = "The word is placed and selected." --Copy / Paste English.Prints.Copy_SelectItem = "Please select an item in order to copy attributes" English.Prints.NumbersOnly = "Please enter numeric values only" English.Prints.CopyFirst = "Please copy an item before pasting" English.Prints.SelectItemSource = "Please select at least one source for new items" English.Prints.NotPasteInventory = "Cannot paste clipboard - your inventory is missing the following items:" English.Prints.NotPasteSelection = "Cannot paste clipboard - the selection is missing the following items:" --Tribal Magic English.Prints.NoRoundTable = "You do not seem to have an Round Tribal Table in your inventory!" --Alfiebet English.Prints.SelectFont = "Select a Font" English.Prints.SelectSize = "Select a Size" English.Prints.SelectSkin = "Select a Skin" English.Prints.OnlyLetters = "Only letters allowed in the word" English.Prints.TypeWord = "Please type a word first" English.Prints.WordMissingItems = "Cannot build this word - the following items are missing from your bags:" English.Prints.WordNeededItems = "The following items are required to create the word \"%s\":" English.Prints.WordCouldNotPrint = "Could not print materials" --Import/Export English.Prints.SetNotFound = "Item set \"%s\" not found" English.Prints.SelectExport = "You must select a set in order to Export it" English.Prints.Exported = "Item set \"%s\" Exported" English.Prints.SelectImport = "You must select a set in order to Import it" English.Prints.Imported = "Item set \"%s\" Imported" English.Prints.TextHint = "<Text input/output>\nCtrl+C: Copy\nCtrl+V: Paste\nCtrl+A: Select all\n" --Load / Save English.Prints.Saved = "Item set \"%s\" saved" English.Prints.MinOneItem = "Must select 1 or more items in order to save them" English.Prints.EnterName = "Must enter a name in order to save the set" English.Prints.LoadNeededItems = "The following items are required for loading \"%s\":" English.Prints.LoadPrintMats = "You must select a set in order to view its materials" English.Prints.LoadSelectSet = "You must select a set in order to load it" English.Prints.NotLoadedBags = "Cannot load set - the following items are missing from your bags:" English.Prints.NotLoadedSelection = "Cannot load set - the following items are missing from your selection:" English.Prints.SetLoaded = "Item set \"%s\" loaded" English.Prints.SetRemoved = "Item set \"%s\" removed" English.Prints.NotRemoved = "Could not remove \"%s\" - no such set found" English.Prints.RemoveSelectSet = "You must select a set in order to remove it" English.Prints.CopiedClipboard = "Item set \"%s\" has been copied to the Copy & Paste tool's clipboard." English.Prints.PickRefPoint = "Please pick a reference point first." English.Prints.NoRefPointWarn = "This item set has no reference point. Using center point instead." --Measurements English.Prints.SelectType = "Select a Type" English.Prints.SelectOrientation = "Select an Orientation" English.Prints.TypeSize = "Type a Size" English.Prints.SizeC = "Make sure Size is between %.2f and %.1f" English.Prints.Selection1 = "Transformed mode requires one selected item." English.Prints.Selection2 = "Selection Delta requires two selected items." --Move, Rotate, Scale English.Prints.ModifyPosition = "Please select an item in order to modify its position" English.Prints.ModifyRotation = "Please select an item in order to modify its rotation" English.Prints.ModifyScale = "Please select an item in order to modify its scale" --Reskin English.Prints.ClipboardEmpty = "The Copy & Paste clipboard is empty." English.Prints.Summary = "Replacement summary:"
Java
from constance.admin import ConstanceForm from django.forms import fields from django.test import TestCase class TestForm(TestCase): def test_form_field_types(self): f = ConstanceForm({}) self.assertIsInstance(f.fields['INT_VALUE'], fields.IntegerField) self.assertIsInstance(f.fields['BOOL_VALUE'], fields.BooleanField) self.assertIsInstance(f.fields['STRING_VALUE'], fields.CharField) self.assertIsInstance(f.fields['DECIMAL_VALUE'], fields.DecimalField) self.assertIsInstance(f.fields['DATETIME_VALUE'], fields.SplitDateTimeField) self.assertIsInstance(f.fields['TIMEDELTA_VALUE'], fields.DurationField) self.assertIsInstance(f.fields['FLOAT_VALUE'], fields.FloatField) self.assertIsInstance(f.fields['DATE_VALUE'], fields.DateField) self.assertIsInstance(f.fields['TIME_VALUE'], fields.TimeField) # from CONSTANCE_ADDITIONAL_FIELDS self.assertIsInstance(f.fields['CHOICE_VALUE'], fields.ChoiceField) self.assertIsInstance(f.fields['EMAIL_VALUE'], fields.EmailField)
Java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE762_Mismatched_Memory_Management_Routines__new_free_struct_54b.cpp Label Definition File: CWE762_Mismatched_Memory_Management_Routines__new_free.label.xml Template File: sources-sinks-54b.tmpl.cpp */ /* * @description * CWE: 762 Mismatched Memory Management Routines * BadSource: Allocate data using new * GoodSource: Allocate data using malloc() * Sinks: * GoodSink: Deallocate data using delete * BadSink : Deallocate data using free() * Flow Variant: 54 Data flow: data passed as an argument from one function through three others to a fifth; all five functions are in different source files * * */ #include "std_testcase.h" namespace CWE762_Mismatched_Memory_Management_Routines__new_free_struct_54 { #ifndef OMITBAD /* bad function declaration */ void badSink_c(twoIntsStruct * data); void badSink_b(twoIntsStruct * data) { badSink_c(data); } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void goodG2BSink_c(twoIntsStruct * data); void goodG2BSink_b(twoIntsStruct * data) { goodG2BSink_c(data); } /* goodB2G uses the BadSource with the GoodSink */ void goodB2GSink_c(twoIntsStruct * data); void goodB2GSink_b(twoIntsStruct * data) { goodB2GSink_c(data); } #endif /* OMITGOOD */ } /* close namespace */
Java
<script> var xx = []; var x = ["aa", "bb"]; var j=Math.random(); for(var i=0; i <2; i++){ for(var k=0; k<2; k++) { if(i==k) xx[i] = x[k]; } } // xx = ["aa", "bb"] </script>
Java
// Copyright (c) 2014-2016, The Monero Project // // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, this list // of conditions and the following disclaimer in the documentation and/or other // materials provided with the distribution. // // 3. Neither the name of the copyright holder nor the names of its contributors may be // used to endorse or promote products derived from this software without specific // prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include "gtest/gtest.h" #include "cryptonote_core/cryptonote_core.h" #include "p2p/net_node.h" #include "cryptonote_protocol/cryptonote_protocol_handler.h" namespace cryptonote { class blockchain_storage; } class test_core { public: void on_synchronized(){} uint64_t get_current_blockchain_height() const {return 1;} void set_target_blockchain_height(uint64_t) {} bool init(const boost::program_options::variables_map& vm) {return true ;} bool deinit(){return true;} bool get_short_chain_history(std::list<crypto::hash>& ids) const { return true; } bool get_stat_info(cryptonote::core_stat_info& st_inf) const {return true;} bool have_block(const crypto::hash& id) const {return true;} bool get_blockchain_top(uint64_t& height, crypto::hash& top_id)const{height=0;top_id=cryptonote::null_hash;return true;} bool handle_incoming_tx(const cryptonote::blobdata& tx_blob, cryptonote::tx_verification_context& tvc, bool keeped_by_block, bool relaued) { return true; } bool handle_incoming_block(const cryptonote::blobdata& block_blob, cryptonote::block_verification_context& bvc, bool update_miner_blocktemplate = true) { return true; } void pause_mine(){} void resume_mine(){} bool on_idle(){return true;} bool find_blockchain_supplement(const std::list<crypto::hash>& qblock_ids, cryptonote::NOTIFY_RESPONSE_CHAIN_ENTRY::request& resp){return true;} bool handle_get_objects(cryptonote::NOTIFY_REQUEST_GET_OBJECTS::request& arg, cryptonote::NOTIFY_RESPONSE_GET_OBJECTS::request& rsp, cryptonote::cryptonote_connection_context& context){return true;} cryptonote::blockchain_storage &get_blockchain_storage() { throw std::runtime_error("Called invalid member function: please never call get_blockchain_storage on the TESTING class test_core."); } bool get_test_drop_download() const {return true;} bool get_test_drop_download_height() const {return true;} bool prepare_handle_incoming_blocks(const std::list<cryptonote::block_complete_entry> &blocks) { return true; } bool cleanup_handle_incoming_blocks(bool force_sync = false) { return true; } uint64_t get_target_blockchain_height() const { return 1; } }; typedef nodetool::node_server<cryptonote::t_cryptonote_protocol_handler<test_core>> Server; static bool is_blocked(Server &server, uint32_t ip, time_t *t = NULL) { std::map<uint32_t, time_t> ips = server.get_blocked_ips(); for (auto rec: ips) { if (rec.first == ip) { if (t) *t = rec.second; return true; } } return false; } TEST(ban, add) { test_core pr_core; cryptonote::t_cryptonote_protocol_handler<test_core> cprotocol(pr_core, NULL); Server server(cprotocol); cprotocol.set_p2p_endpoint(&server); // starts empty ASSERT_TRUE(server.get_blocked_ips().empty()); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,4))); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,5))); // add an IP ASSERT_TRUE(server.block_ip(MAKE_IP(1,2,3,4))); ASSERT_TRUE(server.get_blocked_ips().size() == 1); ASSERT_TRUE(is_blocked(server,MAKE_IP(1,2,3,4))); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,5))); // add the same, should not change ASSERT_TRUE(server.block_ip(MAKE_IP(1,2,3,4))); ASSERT_TRUE(server.get_blocked_ips().size() == 1); ASSERT_TRUE(is_blocked(server,MAKE_IP(1,2,3,4))); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,5))); // remove an unblocked IP, should not change ASSERT_FALSE(server.unblock_ip(MAKE_IP(1,2,3,5))); ASSERT_TRUE(server.get_blocked_ips().size() == 1); ASSERT_TRUE(is_blocked(server,MAKE_IP(1,2,3,4))); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,5))); // remove the IP, ends up empty ASSERT_TRUE(server.unblock_ip(MAKE_IP(1,2,3,4))); ASSERT_TRUE(server.get_blocked_ips().size() == 0); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,4))); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,5))); // remove the IP from an empty list, still empty ASSERT_FALSE(server.unblock_ip(MAKE_IP(1,2,3,4))); ASSERT_TRUE(server.get_blocked_ips().size() == 0); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,4))); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,5))); // add two for known amounts of time, they're both blocked ASSERT_TRUE(server.block_ip(MAKE_IP(1,2,3,4), 1)); ASSERT_TRUE(server.block_ip(MAKE_IP(1,2,3,5), 3)); ASSERT_TRUE(server.get_blocked_ips().size() == 2); ASSERT_TRUE(is_blocked(server,MAKE_IP(1,2,3,4))); ASSERT_TRUE(is_blocked(server,MAKE_IP(1,2,3,5))); ASSERT_TRUE(server.unblock_ip(MAKE_IP(1,2,3,4))); ASSERT_TRUE(server.unblock_ip(MAKE_IP(1,2,3,5))); // these tests would need to call is_remote_ip_allowed, which is private #if 0 // after two seconds, the first IP is unblocked, but not the second yet sleep(2); ASSERT_TRUE(server.get_blocked_ips().size() == 1); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,4))); ASSERT_TRUE(is_blocked(server,MAKE_IP(1,2,3,5))); // after two more seconds, the second IP is also unblocked sleep(2); ASSERT_TRUE(server.get_blocked_ips().size() == 0); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,4))); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,5))); #endif // add an IP again, then re-ban for longer, then shorter time_t t; ASSERT_TRUE(server.block_ip(MAKE_IP(1,2,3,4), 2)); ASSERT_TRUE(server.get_blocked_ips().size() == 1); ASSERT_TRUE(is_blocked(server,MAKE_IP(1,2,3,4), &t)); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,5))); ASSERT_TRUE(t >= 1); ASSERT_TRUE(server.block_ip(MAKE_IP(1,2,3,4), 9)); ASSERT_TRUE(server.get_blocked_ips().size() == 1); ASSERT_TRUE(is_blocked(server,MAKE_IP(1,2,3,4), &t)); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,5))); ASSERT_TRUE(t >= 8); ASSERT_TRUE(server.block_ip(MAKE_IP(1,2,3,4), 5)); ASSERT_TRUE(server.get_blocked_ips().size() == 1); ASSERT_TRUE(is_blocked(server,MAKE_IP(1,2,3,4), &t)); ASSERT_FALSE(is_blocked(server,MAKE_IP(1,2,3,5))); ASSERT_TRUE(t >= 4); }
Java
<?php namespace app\models; use Yii; use app\models\general\GeneralLabel; use app\models\general\GeneralMessage; /** * This is the model class for table "tbl_ref_jawatan_induk". * * @property integer $id * @property string $desc * @property integer $aktif * @property integer $created_by * @property integer $updated_by * @property string $created * @property string $updated */ class RefJawatanInduk extends \yii\db\ActiveRecord { const PRESIDEN = 1; const TIMBALAN_PRESIDEN = 2; const NAIB_PRESIDEN_1 = 3; const NAIB_PRESIDEN_2 = 4; const NAIB_PRESIDEN_3 = 5; const NAIB_PRESIDEN_4 = 6; const NAIB_PRESIDEN_5 = 7; const NAIB_PRESIDEN_6 = 8; const NAIB_PRESIDEN_7 = 9; const NAIB_PRESIDEN_8 = 10; const NAIB_PRESIDEN_9 = 11; const NAIB_PRESIDEN_10 = 12; const BENDAHARI = 13; const PENOLONG_BENDAHARI = 14; const SETIAUSAHA = 15; const PENOLONG_SETIAUSAHA = 16; const AHLI_JAWATANKUASA = 17; const JURUAUDIT_1 = 18; const JURUAUDIT_2 = 19; const PENAUNG = 20; const PENASIHAT = 21; /** * @inheritdoc */ public static function tableName() { return 'tbl_ref_jawatan_induk'; } public function behaviors() { return [ 'bedezign\yii2\audit\AuditTrailBehavior', [ 'class' => \yii\behaviors\BlameableBehavior::className(), 'createdByAttribute' => 'created_by', 'updatedByAttribute' => 'updated_by', ], [ 'class' => \yii\behaviors\TimestampBehavior::className(), 'createdAtAttribute' => 'created', 'updatedAtAttribute' => 'updated', 'value' => new \yii\db\Expression('NOW()'), ], ]; } /** * @inheritdoc */ public function rules() { return [ [['desc'], 'required', 'message' => GeneralMessage::yii_validation_required], [['aktif', 'created_by', 'updated_by'], 'integer', 'message' => GeneralMessage::yii_validation_integer], [['created', 'updated'], 'safe'], [['desc'], 'string', 'max' => 80, 'tooLong' => GeneralMessage::yii_validation_string_max], [['desc'], function ($attribute, $params) { if (!\common\models\general\GeneralFunction::validateXSS($this->$attribute)) { $this->addError($attribute, GeneralMessage::yii_validation_xss); } }], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => GeneralLabel::id, 'desc' => GeneralLabel::desc, 'aktif' => GeneralLabel::aktif, 'created_by' => GeneralLabel::created_by, 'updated_by' => GeneralLabel::updated_by, 'created' => GeneralLabel::created, 'updated' => GeneralLabel::updated, ]; } }
Java
// Copyright 2010 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // ------------------------------------------------------------------------ #include <time.h> #include <assert.h> #include "engine/globals.h" #include "public/logging.h" #include "engine/memory.h" #include "engine/utils.h" #include "engine/opcode.h" #include "engine/map.h" #include "engine/scope.h" #include "engine/type.h" #include "engine/node.h" #include "engine/proc.h" namespace sawzall { Scope* Scope::New(Proc* proc) { Scope* s = NEWP(proc, Scope); return s; } bool Scope::Insert(Object* obj) { assert(obj != NULL); if (obj->is_anonymous() || Lookup(obj->name()) == NULL) { // object doesn't exist yet in this scope => insert it list_.Append(obj); obj->set_scope(this); return true; } else { // object exists already return false; } } void Scope::InsertOrDie(Object* obj) { if (!Insert(obj)) FatalError("identifier '%s' already declared in this scope", obj->name()); } bool Scope::InsertOrOverload(Intrinsic* fun) { assert(fun != NULL); if (Insert(fun)) return true; Object* obj = Lookup(fun->name()); Intrinsic* existing = obj->AsIntrinsic(); if (existing != NULL && existing->add_overload(fun)) { fun->object()->set_scope(this); return true; } return false; } void Scope::InsertOrOverloadOrDie(Intrinsic* fun) { if (!InsertOrOverload(fun)) FatalError("identifier '%s' already declared in this scope", fun->name()); } Object* Scope::Lookup(szl_string name) const { return Lookup(name, strlen(name)); } static bool SamePossiblyDottedName(szl_string dotted_name, szl_string name, int length) { const char* p; const char* q; for (p = dotted_name, q = name; *p != '\0' && q < name + length; p++, q++) { if (*p != *q) { // Possible mismatch, check for the exception case. if (*p == '.' && *q == '_') continue; // Was '.' vs '_', treat it as a match else return false; // Not '.' vs '_', really was a mismatch } } return (*p == '\0' && q == name + length); } Object* Scope::Lookup(szl_string name, int length) const { assert(name != NULL); for (int i = 0; i < list_.length(); i++) { Object* obj = list_[i]; if (!obj->is_anonymous()) { if (memcmp(obj->name(), name, length) == 0 && obj->name()[length] == '\0') return obj; // Temporarily find dotted names (package-qualified names using dot as // the separator) when given a name that matches except for using // underscores where the first name uses dots. if (obj->AsTypeName() != NULL && obj->type()->is_tuple() && obj->type()->as_tuple()->is_message() && SamePossiblyDottedName(obj->name(), name, length)) { return obj; } } } return NULL; } Object* Scope::LookupOrDie(szl_string name) const { Object* obj = Lookup(name); if (obj == NULL) FatalError("identifier '%s' not found in this scope", name); return obj; } Field* Scope::LookupByTag(int tag) const { assert(tag > 0); // tags must be > 0, 0 indicates no tag for (int i = 0; i < list_.length(); i++) { Field* field = list_[i]->AsField(); if (field != NULL && field->tag() == tag) return field; } return NULL; } void Scope::Clone(CloneMap* cmap, Scope* src, Scope* dst) { // Scope entries are just for lookup, so we never clone them; instead // we rely on their having already been cloned where originally written. for (int i = 0; i < src->num_entries(); i++) { // Block scope entries can be VarDecl, TypeName, QuantVarDecl Object* obj = src->entry_at(i); if (obj->AsVarDecl() != NULL) { VarDecl* vardecl = cmap->Find(obj->AsVarDecl()); assert(vardecl != NULL); dst->InsertOrDie(vardecl); } else if (obj->AsTypeName() != NULL) { TypeName* tname = cmap->Find(obj->AsTypeName()); assert(tname != NULL); dst->InsertOrDie(tname); } else { ShouldNotReachHere(); } } } void Scope::Print() const { if (is_empty()) { F.print("{}\n"); } else { F.print("{\n"); for (int i = 0; i < num_entries(); i++) { Object* obj = entry_at(i); F.print(" %s: %T;", obj->display_name(), obj->type()); // print more detail, if possible VarDecl* var = obj->AsVarDecl(); if (var != NULL) { const char* kind = ""; if (var->is_local()) kind = "local"; else if (var->is_param()) kind = "parameter"; else if (var->is_static()) kind = "static"; else ShouldNotReachHere(); F.print(" # %s, offset = %d", kind, var->offset()); } F.print("\n"); } F.print("}\n"); } } // Simulate multiple inheritance. // These should be in the header but that introduces too many dependencies. bool Scope::Insert(BadExpr* x) { return Insert(x->object()); } bool Scope::Insert(Field* x) { return Insert(x->object()); } bool Scope::Insert(Intrinsic* x) { return Insert(x->object()); } bool Scope::Insert(Literal* x) { return Insert(x->object()); } bool Scope::Insert(TypeName* x) { return Insert(x->object()); } bool Scope::Insert(VarDecl* x) { return Insert(x->object()); } void Scope::InsertOrDie(BadExpr* x) { InsertOrDie(x->object()); } void Scope::InsertOrDie(Field* x) { InsertOrDie(x->object()); } void Scope::InsertOrDie(Intrinsic* x) { InsertOrDie(x->object()); } void Scope::InsertOrDie(Literal* x) { InsertOrDie(x->object()); } void Scope::InsertOrDie(TypeName* x) { InsertOrDie(x->object()); } void Scope::InsertOrDie(VarDecl* x) { InsertOrDie(x->object()); } } // namespace sawzall
Java
/* sbt -- Simple Build Tool * Copyright 2009, 2010 Mark Harrah */ package sbt package compiler import scala.util import java.io.File import CompilerArguments.{abs, absString, BootClasspathOption} /** Forms the list of options that is passed to the compiler from the required inputs and other options. * The directory containing scala-library.jar and scala-compiler.jar (scalaLibDirectory) is required in * order to add these jars to the boot classpath. The 'scala.home' property must be unset because Scala * puts jars in that directory on the bootclasspath. Because we use multiple Scala versions, * this would lead to compiling against the wrong library jar.*/ final class CompilerArguments(scalaInstance: ScalaInstance, cp: ClasspathOptions) { def apply(sources: Seq[File], classpath: Seq[File], outputDirectory: File, options: Seq[String]): Seq[String] = { checkScalaHomeUnset() val cpWithCompiler = finishClasspath(classpath) // Scala compiler's treatment of empty classpath is troublesome (as of 2.9.1). // We append a random dummy element as workaround. val dummy = "dummy_" + Integer.toHexString(util.Random.nextInt) val classpathOption = Seq("-classpath", if(cpWithCompiler.isEmpty) dummy else absString(cpWithCompiler)) val outputOption = Seq("-d", outputDirectory.getAbsolutePath) options ++ outputOption ++ bootClasspathOption ++ classpathOption ++ abs(sources) } def finishClasspath(classpath: Seq[File]): Seq[File] = filterLibrary(classpath) ++ include(cp.compiler, scalaInstance.compilerJar) ++ include(cp.extra, scalaInstance.extraJars : _*) private def include(flag: Boolean, jars: File*) = if(flag) jars else Nil protected def abs(files: Seq[File]) = files.map(_.getAbsolutePath).sortWith(_ < _) protected def checkScalaHomeUnset() { val scalaHome = System.getProperty("scala.home") assert((scalaHome eq null) || scalaHome.isEmpty, "'scala.home' should not be set (was " + scalaHome + ")") } /** Add the correct Scala library jar to the boot classpath.*/ def createBootClasspath = { val originalBoot = System.getProperty("sun.boot.class.path", "") if(cp.bootLibrary) { val newBootPrefix = if(originalBoot.isEmpty) "" else originalBoot + File.pathSeparator newBootPrefix + scalaInstance.libraryJar.getAbsolutePath } else originalBoot } def filterLibrary(classpath: Seq[File]) = if(cp.filterLibrary) classpath.filterNot(_.getName contains ScalaArtifacts.LibraryID) else classpath def bootClasspathOption = if(cp.autoBoot) Seq(BootClasspathOption, createBootClasspath) else Nil def bootClasspath = if(cp.autoBoot) IO.parseClasspath(createBootClasspath) else Nil } object CompilerArguments { val BootClasspathOption = "-bootclasspath" def abs(files: Seq[File]): Seq[String] = files.map(_.getAbsolutePath) def abs(files: Set[File]): Seq[String] = abs(files.toSeq) def absString(files: Seq[File]): String = abs(files).mkString(File.pathSeparator) def absString(files: Set[File]): String = absString(files.toSeq) }
Java
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/login/version_info_updater.h" #include <vector> #include "base/bind.h" #include "base/bind_helpers.h" #include "base/chromeos/chromeos_version.h" #include "base/string_util.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/chromeos/settings/cros_settings_names.h" #include "chrome/browser/policy/browser_policy_connector.h" #include "chrome/browser/policy/device_cloud_policy_manager_chromeos.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_version_info.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" namespace chromeos { namespace { const char* kReportingFlags[] = { chromeos::kReportDeviceVersionInfo, chromeos::kReportDeviceActivityTimes, chromeos::kReportDeviceBootMode, chromeos::kReportDeviceLocation, }; } /////////////////////////////////////////////////////////////////////////////// // VersionInfoUpdater public: VersionInfoUpdater::VersionInfoUpdater(Delegate* delegate) : cros_settings_(chromeos::CrosSettings::Get()), delegate_(delegate), ALLOW_THIS_IN_INITIALIZER_LIST(weak_pointer_factory_(this)) { } VersionInfoUpdater::~VersionInfoUpdater() { policy::DeviceCloudPolicyManagerChromeOS* policy_manager = g_browser_process->browser_policy_connector()-> GetDeviceCloudPolicyManager(); if (policy_manager) policy_manager->core()->store()->RemoveObserver(this); for (unsigned int i = 0; i < arraysize(kReportingFlags); ++i) cros_settings_->RemoveSettingsObserver(kReportingFlags[i], this); } void VersionInfoUpdater::StartUpdate(bool is_official_build) { if (base::chromeos::IsRunningOnChromeOS()) { version_loader_.GetVersion( is_official_build ? VersionLoader::VERSION_SHORT_WITH_DATE : VersionLoader::VERSION_FULL, base::Bind(&VersionInfoUpdater::OnVersion, weak_pointer_factory_.GetWeakPtr()), &tracker_); boot_times_loader_.GetBootTimes( base::Bind(is_official_build ? &VersionInfoUpdater::OnBootTimesNoop : &VersionInfoUpdater::OnBootTimes, weak_pointer_factory_.GetWeakPtr()), &tracker_); } else { UpdateVersionLabel(); } policy::CloudPolicySubsystem* cloud_policy = g_browser_process->browser_policy_connector()-> device_cloud_policy_subsystem(); if (cloud_policy) { // Two-step reset because we want to construct new ObserverRegistrar after // destruction of old ObserverRegistrar to avoid DCHECK violation because // of adding existing observer. cloud_policy_registrar_.reset(); cloud_policy_registrar_.reset( new policy::CloudPolicySubsystem::ObserverRegistrar( cloud_policy, this)); // Ensure that we have up-to-date enterprise info in case enterprise policy // is already fetched and has finished initialization. UpdateEnterpriseInfo(); } policy::DeviceCloudPolicyManagerChromeOS* policy_manager = g_browser_process->browser_policy_connector()-> GetDeviceCloudPolicyManager(); if (policy_manager) { policy_manager->core()->store()->AddObserver(this); // Ensure that we have up-to-date enterprise info in case enterprise policy // is already fetched and has finished initialization. UpdateEnterpriseInfo(); } // Watch for changes to the reporting flags. for (unsigned int i = 0; i < arraysize(kReportingFlags); ++i) cros_settings_->AddSettingsObserver(kReportingFlags[i], this); } void VersionInfoUpdater::UpdateVersionLabel() { if (version_text_.empty()) return; chrome::VersionInfo version_info; std::string label_text = l10n_util::GetStringFUTF8( IDS_LOGIN_VERSION_LABEL_FORMAT, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), UTF8ToUTF16(version_info.Version()), UTF8ToUTF16(version_text_)); // Workaround over incorrect width calculation in old fonts. // TODO(glotov): remove the following line when new fonts are used. label_text += ' '; if (delegate_) delegate_->OnOSVersionLabelTextUpdated(label_text); } void VersionInfoUpdater::UpdateEnterpriseInfo() { SetEnterpriseInfo( g_browser_process->browser_policy_connector()->GetEnterpriseDomain()); } void VersionInfoUpdater::SetEnterpriseInfo(const std::string& domain_name) { if (domain_name != enterprise_domain_text_) { enterprise_domain_text_ = domain_name; UpdateVersionLabel(); // Update the notification about device status reporting. if (delegate_) { std::string enterprise_info; if (!domain_name.empty()) { enterprise_info = l10n_util::GetStringFUTF8( IDS_DEVICE_OWNED_BY_NOTICE, UTF8ToUTF16(domain_name)); delegate_->OnEnterpriseInfoUpdated(enterprise_info); } } } } void VersionInfoUpdater::OnVersion(const std::string& version) { version_text_ = version; UpdateVersionLabel(); } void VersionInfoUpdater::OnBootTimesNoop( const BootTimesLoader::BootTimes& boot_times) {} void VersionInfoUpdater::OnBootTimes( const BootTimesLoader::BootTimes& boot_times) { const char* kBootTimesNoChromeExec = "Non-firmware boot took %.2f seconds (kernel %.2fs, system %.2fs)"; const char* kBootTimesChromeExec = "Non-firmware boot took %.2f seconds " "(kernel %.2fs, system %.2fs, chrome %.2fs)"; std::string boot_times_text; if (boot_times.chrome > 0) { boot_times_text = base::StringPrintf( kBootTimesChromeExec, boot_times.total, boot_times.pre_startup, boot_times.system, boot_times.chrome); } else { boot_times_text = base::StringPrintf( kBootTimesNoChromeExec, boot_times.total, boot_times.pre_startup, boot_times.system); } // Use UTF8ToWide once this string is localized. if (delegate_) delegate_->OnBootTimesLabelTextUpdated(boot_times_text); } void VersionInfoUpdater::OnPolicyStateChanged( policy::CloudPolicySubsystem::PolicySubsystemState state, policy::CloudPolicySubsystem::ErrorDetails error_details) { UpdateEnterpriseInfo(); } void VersionInfoUpdater::OnStoreLoaded(policy::CloudPolicyStore* store) { UpdateEnterpriseInfo(); } void VersionInfoUpdater::OnStoreError(policy::CloudPolicyStore* store) { UpdateEnterpriseInfo(); } void VersionInfoUpdater::Observe( int type, const content::NotificationSource& source, const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_SYSTEM_SETTING_CHANGED) UpdateEnterpriseInfo(); else NOTREACHED(); } } // namespace chromeos
Java
// Copyright (c) 2016 Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include "source/opt/fold.h" #include <limits> #include <memory> #include <string> #include <unordered_set> #include <vector> #include "effcee/effcee.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include "source/opt/build_module.h" #include "source/opt/def_use_manager.h" #include "source/opt/ir_context.h" #include "source/opt/module.h" #include "spirv-tools/libspirv.hpp" #include "test/opt/pass_utils.h" namespace spvtools { namespace opt { namespace { using ::testing::Contains; std::string Disassemble(const std::string& original, IRContext* context, uint32_t disassemble_options = 0) { std::vector<uint32_t> optimized_bin; context->module()->ToBinary(&optimized_bin, true); spv_target_env target_env = SPV_ENV_UNIVERSAL_1_2; SpirvTools tools(target_env); std::string optimized_asm; EXPECT_TRUE( tools.Disassemble(optimized_bin, &optimized_asm, disassemble_options)) << "Disassembling failed for shader:\n" << original << std::endl; return optimized_asm; } void Match(const std::string& original, IRContext* context, uint32_t disassemble_options = 0) { std::string disassembly = Disassemble(original, context, disassemble_options); auto match_result = effcee::Match(disassembly, original); EXPECT_EQ(effcee::Result::Status::Ok, match_result.status()) << match_result.message() << "\nChecking result:\n" << disassembly; } template <class ResultType> struct InstructionFoldingCase { InstructionFoldingCase(const std::string& tb, uint32_t id, ResultType result) : test_body(tb), id_to_fold(id), expected_result(result) {} std::string test_body; uint32_t id_to_fold; ResultType expected_result; }; using IntegerInstructionFoldingTest = ::testing::TestWithParam<InstructionFoldingCase<uint32_t>>; TEST_P(IntegerInstructionFoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); // Make sure the instruction folded as expected. EXPECT_TRUE(succeeded); if (inst != nullptr) { EXPECT_EQ(inst->opcode(), SpvOpCopyObject); inst = def_use_mgr->GetDef(inst->GetSingleWordInOperand(0)); EXPECT_EQ(inst->opcode(), SpvOpConstant); analysis::ConstantManager* const_mrg = context->get_constant_mgr(); const analysis::IntConstant* result = const_mrg->GetConstantFromInst(inst)->AsIntConstant(); EXPECT_NE(result, nullptr); if (result != nullptr) { EXPECT_EQ(result->GetU32BitValue(), tc.expected_result); } } } // Returns a common SPIR-V header for all of the test that follow. #define INT_0_ID 100 #define TRUE_ID 101 #define VEC2_0_ID 102 #define INT_7_ID 103 #define FLOAT_0_ID 104 #define DOUBLE_0_ID 105 #define VEC4_0_ID 106 #define DVEC4_0_ID 106 #define HALF_0_ID 108 const std::string& Header() { static const std::string header = R"(OpCapability Shader OpCapability Float16 OpCapability Float64 OpCapability Int16 OpCapability Int64 %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %main "main" OpExecutionMode %main OriginUpperLeft OpSource GLSL 140 OpName %main "main" %void = OpTypeVoid %void_func = OpTypeFunction %void %bool = OpTypeBool %float = OpTypeFloat 32 %double = OpTypeFloat 64 %half = OpTypeFloat 16 %101 = OpConstantTrue %bool ; Need a def with an numerical id to define id maps. %true = OpConstantTrue %bool %false = OpConstantFalse %bool %bool_null = OpConstantNull %bool %short = OpTypeInt 16 1 %int = OpTypeInt 32 1 %long = OpTypeInt 64 1 %uint = OpTypeInt 32 0 %v2int = OpTypeVector %int 2 %v4int = OpTypeVector %int 4 %v4float = OpTypeVector %float 4 %v4double = OpTypeVector %double 4 %v2float = OpTypeVector %float 2 %v2double = OpTypeVector %double 2 %v2half = OpTypeVector %half 2 %v2bool = OpTypeVector %bool 2 %struct_v2int_int_int = OpTypeStruct %v2int %int %int %_ptr_int = OpTypePointer Function %int %_ptr_uint = OpTypePointer Function %uint %_ptr_bool = OpTypePointer Function %bool %_ptr_float = OpTypePointer Function %float %_ptr_double = OpTypePointer Function %double %_ptr_half = OpTypePointer Function %half %_ptr_long = OpTypePointer Function %long %_ptr_v2int = OpTypePointer Function %v2int %_ptr_v4int = OpTypePointer Function %v4int %_ptr_v4float = OpTypePointer Function %v4float %_ptr_v4double = OpTypePointer Function %v4double %_ptr_struct_v2int_int_int = OpTypePointer Function %struct_v2int_int_int %_ptr_v2float = OpTypePointer Function %v2float %_ptr_v2double = OpTypePointer Function %v2double %short_0 = OpConstant %short 0 %short_2 = OpConstant %short 2 %short_3 = OpConstant %short 3 %100 = OpConstant %int 0 ; Need a def with an numerical id to define id maps. %103 = OpConstant %int 7 ; Need a def with an numerical id to define id maps. %int_0 = OpConstant %int 0 %int_1 = OpConstant %int 1 %int_2 = OpConstant %int 2 %int_3 = OpConstant %int 3 %int_4 = OpConstant %int 4 %int_n24 = OpConstant %int -24 %int_min = OpConstant %int -2147483648 %int_max = OpConstant %int 2147483647 %long_0 = OpConstant %long 0 %long_2 = OpConstant %long 2 %long_3 = OpConstant %long 3 %uint_0 = OpConstant %uint 0 %uint_1 = OpConstant %uint 1 %uint_2 = OpConstant %uint 2 %uint_3 = OpConstant %uint 3 %uint_4 = OpConstant %uint 4 %uint_32 = OpConstant %uint 32 %uint_42 = OpConstant %uint 42 %uint_max = OpConstant %uint 4294967295 %v2int_undef = OpUndef %v2int %v2int_0_0 = OpConstantComposite %v2int %int_0 %int_0 %v2int_1_0 = OpConstantComposite %v2int %int_1 %int_0 %v2int_2_2 = OpConstantComposite %v2int %int_2 %int_2 %v2int_2_3 = OpConstantComposite %v2int %int_2 %int_3 %v2int_3_2 = OpConstantComposite %v2int %int_3 %int_2 %v2int_4_4 = OpConstantComposite %v2int %int_4 %int_4 %v2bool_null = OpConstantNull %v2bool %v2bool_true_false = OpConstantComposite %v2bool %true %false %v2bool_false_true = OpConstantComposite %v2bool %false %true %struct_v2int_int_int_null = OpConstantNull %struct_v2int_int_int %v2int_null = OpConstantNull %v2int %102 = OpConstantComposite %v2int %103 %103 %v4int_0_0_0_0 = OpConstantComposite %v4int %int_0 %int_0 %int_0 %int_0 %struct_undef_0_0 = OpConstantComposite %struct_v2int_int_int %v2int_undef %int_0 %int_0 %float_n1 = OpConstant %float -1 %104 = OpConstant %float 0 ; Need a def with an numerical id to define id maps. %float_null = OpConstantNull %float %float_0 = OpConstant %float 0 %float_1 = OpConstant %float 1 %float_2 = OpConstant %float 2 %float_3 = OpConstant %float 3 %float_4 = OpConstant %float 4 %float_2049 = OpConstant %float 2049 %float_n2049 = OpConstant %float -2049 %float_0p5 = OpConstant %float 0.5 %float_0p2 = OpConstant %float 0.2 %float_pi = OpConstant %float 1.5555 %float_1e16 = OpConstant %float 1e16 %float_n1e16 = OpConstant %float -1e16 %float_1en16 = OpConstant %float 1e-16 %float_n1en16 = OpConstant %float -1e-16 %v2float_0_0 = OpConstantComposite %v2float %float_0 %float_0 %v2float_2_2 = OpConstantComposite %v2float %float_2 %float_2 %v2float_2_3 = OpConstantComposite %v2float %float_2 %float_3 %v2float_3_2 = OpConstantComposite %v2float %float_3 %float_2 %v2float_4_4 = OpConstantComposite %v2float %float_4 %float_4 %v2float_2_0p5 = OpConstantComposite %v2float %float_2 %float_0p5 %v2float_0p2_0p5 = OpConstantComposite %v2float %float_0p2 %float_0p5 %v2float_null = OpConstantNull %v2float %double_n1 = OpConstant %double -1 %105 = OpConstant %double 0 ; Need a def with an numerical id to define id maps. %double_null = OpConstantNull %double %double_0 = OpConstant %double 0 %double_1 = OpConstant %double 1 %double_2 = OpConstant %double 2 %double_3 = OpConstant %double 3 %double_4 = OpConstant %double 4 %double_5 = OpConstant %double 5 %double_0p5 = OpConstant %double 0.5 %double_0p2 = OpConstant %double 0.2 %v2double_0_0 = OpConstantComposite %v2double %double_0 %double_0 %v2double_2_2 = OpConstantComposite %v2double %double_2 %double_2 %v2double_2_3 = OpConstantComposite %v2double %double_2 %double_3 %v2double_3_2 = OpConstantComposite %v2double %double_3 %double_2 %v2double_4_4 = OpConstantComposite %v2double %double_4 %double_4 %v2double_2_0p5 = OpConstantComposite %v2double %double_2 %double_0p5 %v2double_null = OpConstantNull %v2double %108 = OpConstant %half 0 %half_1 = OpConstant %half 1 %half_0_1 = OpConstantComposite %v2half %108 %half_1 %106 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %v4float_0_0_0_0 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %v4float_0_0_0_1 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1 %v4float_0_1_0_0 = OpConstantComposite %v4float %float_0 %float_1 %float_null %float_0 %v4float_1_1_1_1 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %107 = OpConstantComposite %v4double %double_0 %double_0 %double_0 %double_0 %v4double_0_0_0_0 = OpConstantComposite %v4double %double_0 %double_0 %double_0 %double_0 %v4double_0_0_0_1 = OpConstantComposite %v4double %double_0 %double_0 %double_0 %double_1 %v4double_0_1_0_0 = OpConstantComposite %v4double %double_0 %double_1 %double_null %double_0 %v4double_1_1_1_1 = OpConstantComposite %v4double %double_1 %double_1 %double_1 %double_1 %v4double_1_1_1_0p5 = OpConstantComposite %v4double %double_1 %double_1 %double_1 %double_0p5 %v4double_null = OpConstantNull %v4double %v4float_n1_2_1_3 = OpConstantComposite %v4float %float_n1 %float_2 %float_1 %float_3 )"; return header; } // Returns the header with definitions of float NaN and double NaN. Since FC // "; CHECK: [[double_n0:%\\w+]] = OpConstant [[double]] -0\n" finds // %double_nan = OpConstant %double -0x1.8p+1024 instead of // %double_n0 = OpConstant %double -0, // we separates those definitions from Header(). const std::string& HeaderWithNaN() { static const std::string headerWithNaN = Header() + R"(%float_nan = OpConstant %float -0x1.8p+128 %double_nan = OpConstant %double -0x1.8p+1024 )"; return headerWithNaN; } // clang-format off INSTANTIATE_TEST_SUITE_P(TestCase, IntegerInstructionFoldingTest, ::testing::Values( // Test case 0: fold 0*n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpIMul %int %int_0 %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 1: fold n*0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpIMul %int %load %int_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 2: fold 0/n (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSDiv %int %int_0 %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 3: fold n/0 (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSDiv %int %load %int_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 4: fold 0/n (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpUDiv %uint %uint_0 %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 5: fold n/0 (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSDiv %int %load %int_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 6: fold 0 remainder n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSRem %int %int_0 %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 7: fold n remainder 0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSRem %int %load %int_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 8: fold 0%n (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSMod %int %int_0 %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 9: fold n%0 (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSMod %int %load %int_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 10: fold 0%n (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpUMod %uint %uint_0 %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 11: fold n%0 (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpUMod %uint %load %uint_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 12: fold n << 32 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpShiftLeftLogical %uint %load %uint_32\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 13: fold n >> 32 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpShiftRightLogical %uint %load %uint_32\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 14: fold n | 0xFFFFFFFF InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpBitwiseOr %uint %load %uint_max\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0xFFFFFFFF), // Test case 15: fold 0xFFFFFFFF | n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpBitwiseOr %uint %uint_max %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0xFFFFFFFF), // Test case 16: fold n & 0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpBitwiseAnd %uint %load %uint_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 17: fold 1/0 (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpSDiv %int %int_1 %int_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 18: fold 1/0 (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpUDiv %uint %uint_1 %uint_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 19: fold OpSRem 1 0 (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpSRem %int %int_1 %int_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 20: fold 1%0 (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpSMod %int %int_1 %int_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 21: fold 1%0 (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpUMod %uint %uint_1 %uint_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 22: fold unsigned n >> 42 (undefined, so set to zero). InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpShiftRightLogical %uint %load %uint_42\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 23: fold signed n >> 42 (undefined, so set to zero). InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpShiftRightLogical %int %load %uint_42\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 24: fold n << 42 (undefined, so set to zero). InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpShiftLeftLogical %int %load %uint_42\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 25: fold -24 >> 32 (defined as -1) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpShiftRightArithmetic %int %int_n24 %uint_32\n" + "OpReturn\n" + "OpFunctionEnd", 2, -1), // Test case 26: fold 2 >> 32 (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpShiftRightArithmetic %int %int_2 %uint_32\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 27: fold 2 >> 32 (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpShiftRightLogical %int %int_2 %uint_32\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 28: fold 2 << 32 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpShiftLeftLogical %int %int_2 %uint_32\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 29: fold -INT_MIN InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpSNegate %int %int_min\n" + "OpReturn\n" + "OpFunctionEnd", 2, std::numeric_limits<int32_t>::min()), // Test case 30: fold UMin 3 4 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %uint %1 UMin %uint_3 %uint_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 31: fold UMin 4 2 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %uint %1 UMin %uint_4 %uint_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2), // Test case 32: fold SMin 3 4 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %int %1 UMin %int_3 %int_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 33: fold SMin 4 2 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %int %1 SMin %int_4 %int_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2), // Test case 34: fold UMax 3 4 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %uint %1 UMax %uint_3 %uint_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 4), // Test case 35: fold UMax 3 2 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %uint %1 UMax %uint_3 %uint_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 36: fold SMax 3 4 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %int %1 UMax %int_3 %int_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 4), // Test case 37: fold SMax 3 2 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %int %1 SMax %int_3 %int_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 38: fold UClamp 2 3 4 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %uint %1 UClamp %uint_2 %uint_3 %uint_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 39: fold UClamp 2 0 4 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %uint %1 UClamp %uint_2 %uint_0 %uint_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2), // Test case 40: fold UClamp 2 0 1 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %uint %1 UClamp %uint_2 %uint_0 %uint_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1), // Test case 41: fold SClamp 2 3 4 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %int %1 SClamp %int_2 %int_3 %int_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 42: fold SClamp 2 0 4 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %int %1 SClamp %int_2 %int_0 %int_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2), // Test case 43: fold SClamp 2 0 1 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %int %1 SClamp %int_2 %int_0 %int_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1), // Test case 44: SClamp 1 2 x InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%undef = OpUndef %int\n" + "%2 = OpExtInst %int %1 SClamp %int_1 %int_2 %undef\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2), // Test case 45: SClamp 2 x 1 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%undef = OpUndef %int\n" + "%2 = OpExtInst %int %1 SClamp %int_2 %undef %int_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1), // Test case 44: UClamp 1 2 x InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%undef = OpUndef %uint\n" + "%2 = OpExtInst %uint %1 UClamp %uint_1 %uint_2 %undef\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2), // Test case 45: UClamp 2 x 1 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%undef = OpUndef %uint\n" + "%2 = OpExtInst %uint %1 UClamp %uint_2 %undef %uint_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1) )); // clang-format on using IntVectorInstructionFoldingTest = ::testing::TestWithParam<InstructionFoldingCase<std::vector<uint32_t>>>; TEST_P(IntVectorInstructionFoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); SpvOp original_opcode = inst->opcode(); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); // Make sure the instruction folded as expected. EXPECT_EQ(succeeded, inst == nullptr || inst->opcode() != original_opcode); if (succeeded && inst != nullptr) { EXPECT_EQ(inst->opcode(), SpvOpCopyObject); inst = def_use_mgr->GetDef(inst->GetSingleWordInOperand(0)); std::vector<SpvOp> opcodes = {SpvOpConstantComposite}; EXPECT_THAT(opcodes, Contains(inst->opcode())); analysis::ConstantManager* const_mrg = context->get_constant_mgr(); const analysis::Constant* result = const_mrg->GetConstantFromInst(inst); EXPECT_NE(result, nullptr); if (result != nullptr) { const std::vector<const analysis::Constant*>& componenets = result->AsVectorConstant()->GetComponents(); EXPECT_EQ(componenets.size(), tc.expected_result.size()); for (size_t i = 0; i < componenets.size(); i++) { EXPECT_EQ(tc.expected_result[i], componenets[i]->GetU32()); } } } } // clang-format off INSTANTIATE_TEST_SUITE_P(TestCase, IntVectorInstructionFoldingTest, ::testing::Values( // Test case 0: fold 0*n InstructionFoldingCase<std::vector<uint32_t>>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpVectorShuffle %v2int %v2int_2_2 %v2int_2_3 0 3\n" + "OpReturn\n" + "OpFunctionEnd", 2, {2,3}), InstructionFoldingCase<std::vector<uint32_t>>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpVectorShuffle %v2int %v2int_null %v2int_2_3 0 3\n" + "OpReturn\n" + "OpFunctionEnd", 2, {0,3}), InstructionFoldingCase<std::vector<uint32_t>>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpVectorShuffle %v2int %v2int_null %v2int_2_3 4294967295 3\n" + "OpReturn\n" + "OpFunctionEnd", 2, {0,0}), InstructionFoldingCase<std::vector<uint32_t>>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpVectorShuffle %v2int %v2int_null %v2int_2_3 0 4294967295 \n" + "OpReturn\n" + "OpFunctionEnd", 2, {0,0}) )); // clang-format on using FloatVectorInstructionFoldingTest = ::testing::TestWithParam<InstructionFoldingCase<std::vector<float>>>; TEST_P(FloatVectorInstructionFoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); SpvOp original_opcode = inst->opcode(); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); // Make sure the instruction folded as expected. EXPECT_EQ(succeeded, inst == nullptr || inst->opcode() != original_opcode); if (succeeded && inst != nullptr) { EXPECT_EQ(inst->opcode(), SpvOpCopyObject); inst = def_use_mgr->GetDef(inst->GetSingleWordInOperand(0)); std::vector<SpvOp> opcodes = {SpvOpConstantComposite}; EXPECT_THAT(opcodes, Contains(inst->opcode())); analysis::ConstantManager* const_mrg = context->get_constant_mgr(); const analysis::Constant* result = const_mrg->GetConstantFromInst(inst); EXPECT_NE(result, nullptr); if (result != nullptr) { const std::vector<const analysis::Constant*>& componenets = result->AsVectorConstant()->GetComponents(); EXPECT_EQ(componenets.size(), tc.expected_result.size()); for (size_t i = 0; i < componenets.size(); i++) { EXPECT_EQ(tc.expected_result[i], componenets[i]->GetFloat()); } } } } // clang-format off INSTANTIATE_TEST_SUITE_P(TestCase, FloatVectorInstructionFoldingTest, ::testing::Values( // Test case 0: FMix {2.0, 2.0}, {2.0, 3.0} {0.2,0.5} InstructionFoldingCase<std::vector<float>>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %v2float %1 FMix %v2float_2_3 %v2float_0_0 %v2float_0p2_0p5\n" + "OpReturn\n" + "OpFunctionEnd", 2, {1.6f,1.5f}) )); // clang-format on using BooleanInstructionFoldingTest = ::testing::TestWithParam<InstructionFoldingCase<bool>>; TEST_P(BooleanInstructionFoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); // Make sure the instruction folded as expected. EXPECT_TRUE(succeeded); if (inst != nullptr) { EXPECT_EQ(inst->opcode(), SpvOpCopyObject); inst = def_use_mgr->GetDef(inst->GetSingleWordInOperand(0)); std::vector<SpvOp> bool_opcodes = {SpvOpConstantTrue, SpvOpConstantFalse}; EXPECT_THAT(bool_opcodes, Contains(inst->opcode())); analysis::ConstantManager* const_mrg = context->get_constant_mgr(); const analysis::BoolConstant* result = const_mrg->GetConstantFromInst(inst)->AsBoolConstant(); EXPECT_NE(result, nullptr); if (result != nullptr) { EXPECT_EQ(result->value(), tc.expected_result); } } } // clang-format off INSTANTIATE_TEST_SUITE_P(TestCase, BooleanInstructionFoldingTest, ::testing::Values( // Test case 0: fold true || n InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_bool Function\n" + "%load = OpLoad %bool %n\n" + "%2 = OpLogicalOr %bool %true %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 1: fold n || true InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_bool Function\n" + "%load = OpLoad %bool %n\n" + "%2 = OpLogicalOr %bool %load %true\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 2: fold false && n InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_bool Function\n" + "%load = OpLoad %bool %n\n" + "%2 = OpLogicalAnd %bool %false %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 3: fold n && false InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_bool Function\n" + "%load = OpLoad %bool %n\n" + "%2 = OpLogicalAnd %bool %load %false\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 4: fold n < 0 (unsigned) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpULessThan %bool %load %uint_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 5: fold UINT_MAX < n (unsigned) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpULessThan %bool %uint_max %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 6: fold INT_MAX < n (signed) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSLessThan %bool %int_max %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 7: fold n < INT_MIN (signed) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSLessThan %bool %load %int_min\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 8: fold 0 > n (unsigned) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpUGreaterThan %bool %uint_0 %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 9: fold n > UINT_MAX (unsigned) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpUGreaterThan %bool %load %uint_max\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 10: fold n > INT_MAX (signed) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSGreaterThan %bool %load %int_max\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 11: fold INT_MIN > n (signed) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpSGreaterThan %bool %int_min %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 12: fold 0 <= n (unsigned) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpULessThanEqual %bool %uint_0 %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 13: fold n <= UINT_MAX (unsigned) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpULessThanEqual %bool %load %uint_max\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 14: fold INT_MIN <= n (signed) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSLessThanEqual %bool %int_min %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 15: fold n <= INT_MAX (signed) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSLessThanEqual %bool %load %int_max\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 16: fold n >= 0 (unsigned) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpUGreaterThanEqual %bool %load %uint_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 17: fold UINT_MAX >= n (unsigned) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load = OpLoad %uint %n\n" + "%2 = OpUGreaterThanEqual %bool %uint_max %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 18: fold n >= INT_MIN (signed) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSGreaterThanEqual %bool %load %int_min\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 19: fold INT_MAX >= n (signed) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSGreaterThanEqual %bool %int_max %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, true) )); INSTANTIATE_TEST_SUITE_P(FClampAndCmpLHS, BooleanInstructionFoldingTest, ::testing::Values( // Test case 0: fold 0.0 > clamp(n, 0.0, 1.0) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_0 %float_1\n" + "%2 = OpFOrdGreaterThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 1: fold 0.0 > clamp(n, -1.0, -1.0) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_n1\n" + "%2 = OpFOrdGreaterThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 2: fold 0.0 >= clamp(n, 1, 2) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_2\n" + "%2 = OpFOrdGreaterThanEqual %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 3: fold 0.0 >= clamp(n, -1.0, 0.0) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_0\n" + "%2 = OpFOrdGreaterThanEqual %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 4: fold 0.0 <= clamp(n, 0.0, 1.0) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_0 %float_1\n" + "%2 = OpFOrdLessThanEqual %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 5: fold 0.0 <= clamp(n, -1.0, -1.0) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_n1\n" + "%2 = OpFOrdLessThanEqual %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 6: fold 0.0 < clamp(n, 1, 2) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_2\n" + "%2 = OpFOrdLessThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 7: fold 0.0 < clamp(n, -1.0, 0.0) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_0\n" + "%2 = OpFOrdLessThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 8: fold 0.0 > clamp(n, 0.0, 1.0) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_0 %float_1\n" + "%2 = OpFUnordGreaterThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 9: fold 0.0 > clamp(n, -1.0, -1.0) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_n1\n" + "%2 = OpFUnordGreaterThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 10: fold 0.0 >= clamp(n, 1, 2) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_2\n" + "%2 = OpFUnordGreaterThanEqual %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 11: fold 0.0 >= clamp(n, -1.0, 0.0) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_0\n" + "%2 = OpFUnordGreaterThanEqual %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 12: fold 0.0 <= clamp(n, 0.0, 1.0) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_0 %float_1\n" + "%2 = OpFUnordLessThanEqual %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 13: fold 0.0 <= clamp(n, -1.0, -1.0) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_n1\n" + "%2 = OpFUnordLessThanEqual %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 14: fold 0.0 < clamp(n, 1, 2) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_2\n" + "%2 = OpFUnordLessThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 15: fold 0.0 < clamp(n, -1.0, 0.0) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_0\n" + "%2 = OpFUnordLessThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, false) )); INSTANTIATE_TEST_SUITE_P(FClampAndCmpRHS, BooleanInstructionFoldingTest, ::testing::Values( // Test case 0: fold clamp(n, 0.0, 1.0) > 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_0 %float_1\n" + "%2 = OpFOrdGreaterThan %bool %clamp %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 1: fold clamp(n, 1.0, 1.0) > 0.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_1\n" + "%2 = OpFOrdGreaterThan %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 2: fold clamp(n, 1, 2) >= 0.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_2\n" + "%2 = OpFOrdGreaterThanEqual %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 3: fold clamp(n, 1.0, 2.0) >= 3.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_2\n" + "%2 = OpFOrdGreaterThanEqual %bool %clamp %float_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 4: fold clamp(n, 0.0, 1.0) <= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_0 %float_1\n" + "%2 = OpFOrdLessThanEqual %bool %clamp %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 5: fold clamp(n, 1.0, 2.0) <= 0.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_2\n" + "%2 = OpFOrdLessThanEqual %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 6: fold clamp(n, 1, 2) < 3 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_2\n" + "%2 = OpFOrdLessThan %bool %clamp %float_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 7: fold clamp(n, -1.0, 0.0) < -1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_0\n" + "%2 = OpFOrdLessThan %bool %clamp %float_n1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 8: fold clamp(n, 0.0, 1.0) > 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_0 %float_1\n" + "%2 = OpFUnordGreaterThan %bool %clamp %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 9: fold clamp(n, 1.0, 2.0) > 0.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_2\n" + "%2 = OpFUnordGreaterThan %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 10: fold clamp(n, 1, 2) >= 3.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_2\n" + "%2 = OpFUnordGreaterThanEqual %bool %clamp %float_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 11: fold clamp(n, -1.0, 0.0) >= -1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_0\n" + "%2 = OpFUnordGreaterThanEqual %bool %clamp %float_n1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 12: fold clamp(n, 0.0, 1.0) <= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_0 %float_1\n" + "%2 = OpFUnordLessThanEqual %bool %clamp %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 13: fold clamp(n, 1.0, 1.0) <= 0.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_1\n" + "%2 = OpFUnordLessThanEqual %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 14: fold clamp(n, 1, 2) < 3 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_1 %float_2\n" + "%2 = OpFUnordLessThan %bool %clamp %float_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 15: fold clamp(n, -1.0, 0.0) < -1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_0\n" + "%2 = OpFUnordLessThan %bool %clamp %float_n1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 16: fold clamp(n, -1.0, 0.0) < -1.0 (one test for double) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%ld = OpLoad %double %n\n" + "%clamp = OpExtInst %double %1 FClamp %ld %double_n1 %double_0\n" + "%2 = OpFUnordLessThan %bool %clamp %double_n1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false) )); // clang-format on using FloatInstructionFoldingTest = ::testing::TestWithParam<InstructionFoldingCase<float>>; TEST_P(FloatInstructionFoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); // Make sure the instruction folded as expected. EXPECT_TRUE(succeeded); if (inst != nullptr) { EXPECT_EQ(inst->opcode(), SpvOpCopyObject); inst = def_use_mgr->GetDef(inst->GetSingleWordInOperand(0)); EXPECT_EQ(inst->opcode(), SpvOpConstant); analysis::ConstantManager* const_mrg = context->get_constant_mgr(); const analysis::FloatConstant* result = const_mrg->GetConstantFromInst(inst)->AsFloatConstant(); EXPECT_NE(result, nullptr); if (result != nullptr) { if (!std::isnan(tc.expected_result)) { EXPECT_EQ(result->GetFloatValue(), tc.expected_result); } else { EXPECT_TRUE(std::isnan(result->GetFloatValue())); } } } } // Not testing NaNs because there are no expectations concerning NaNs according // to the "Precision and Operation of SPIR-V Instructions" section of the Vulkan // specification. // clang-format off INSTANTIATE_TEST_SUITE_P(FloatConstantFoldingTest, FloatInstructionFoldingTest, ::testing::Values( // Test case 0: Fold 2.0 - 1.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFSub %float %float_2 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1.0), // Test case 1: Fold 2.0 + 1.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFAdd %float %float_2 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3.0), // Test case 2: Fold 3.0 * 2.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFMul %float %float_3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 6.0), // Test case 3: Fold 1.0 / 2.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFDiv %float %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.5), // Test case 4: Fold 1.0 / 0.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFDiv %float %float_1 %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, std::numeric_limits<float>::infinity()), // Test case 5: Fold -1.0 / 0.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFDiv %float %float_n1 %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, -std::numeric_limits<float>::infinity()), // Test case 6: Fold (2.0, 3.0) dot (2.0, 0.5) InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpDot %float %v2float_2_3 %v2float_2_0p5\n" + "OpReturn\n" + "OpFunctionEnd", 2, 5.5f), // Test case 7: Fold (0.0, 0.0) dot v InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%v = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %v2float %v\n" + "%3 = OpDot %float %v2float_0_0 %2\n" + "OpReturn\n" + "OpFunctionEnd", 3, 0.0f), // Test case 8: Fold v dot (0.0, 0.0) InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%v = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %v2float %v\n" + "%3 = OpDot %float %2 %v2float_0_0\n" + "OpReturn\n" + "OpFunctionEnd", 3, 0.0f), // Test case 9: Fold Null dot v InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%v = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %v2float %v\n" + "%3 = OpDot %float %v2float_null %2\n" + "OpReturn\n" + "OpFunctionEnd", 3, 0.0f), // Test case 10: Fold v dot Null InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%v = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %v2float %v\n" + "%3 = OpDot %float %2 %v2float_null\n" + "OpReturn\n" + "OpFunctionEnd", 3, 0.0f), // Test case 11: Fold -2.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFNegate %float %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, -2), // Test case 12: QuantizeToF16 1.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpQuantizeToF16 %float %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1.0), // Test case 13: QuantizeToF16 positive non exact InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpQuantizeToF16 %float %float_2049\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2048), // Test case 14: QuantizeToF16 negative non exact InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpQuantizeToF16 %float %float_n2049\n" + "OpReturn\n" + "OpFunctionEnd", 2, -2048), // Test case 15: QuantizeToF16 large positive InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpQuantizeToF16 %float %float_1e16\n" + "OpReturn\n" + "OpFunctionEnd", 2, std::numeric_limits<float>::infinity()), // Test case 16: QuantizeToF16 large negative InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpQuantizeToF16 %float %float_n1e16\n" + "OpReturn\n" + "OpFunctionEnd", 2, -std::numeric_limits<float>::infinity()), // Test case 17: QuantizeToF16 small positive InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpQuantizeToF16 %float %float_1en16\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.0), // Test case 18: QuantizeToF16 small negative InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpQuantizeToF16 %float %float_n1en16\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.0), // Test case 19: QuantizeToF16 nan InstructionFoldingCase<float>( HeaderWithNaN() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpQuantizeToF16 %float %float_nan\n" + "OpReturn\n" + "OpFunctionEnd", 2, std::numeric_limits<float>::quiet_NaN()), // Test case 20: FMix 1.0 4.0 0.2 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 FMix %float_1 %float_4 %float_0p2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1.6f), // Test case 21: FMin 1.0 4.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 FMin %float_1 %float_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1.0f), // Test case 22: FMin 4.0 0.2 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 FMin %float_4 %float_0p2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.2f), // Test case 23: FMax 1.0 4.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 FMax %float_1 %float_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 4.0f), // Test case 24: FMax 1.0 0.2 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 FMax %float_1 %float_0p2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1.0f), // Test case 25: FClamp 1.0 0.2 4.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 FClamp %float_1 %float_0p2 %float_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1.0f), // Test case 26: FClamp 0.2 2.0 4.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 FClamp %float_0p2 %float_2 %float_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2.0f), // Test case 27: FClamp 2049.0 2.0 4.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 FClamp %float_2049 %float_2 %float_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 4.0f), // Test case 28: FClamp 1.0 2.0 x InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%undef = OpUndef %float\n" + "%2 = OpExtInst %float %1 FClamp %float_1 %float_2 %undef\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2.0), // Test case 29: FClamp 1.0 x 0.5 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%undef = OpUndef %float\n" + "%2 = OpExtInst %float %1 FClamp %float_1 %undef %float_0p5\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.5), // Test case 30: Sin 0.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Sin %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.0), // Test case 31: Cos 0.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Cos %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1.0), // Test case 32: Tan 0.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Tan %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.0), // Test case 33: Asin 0.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Asin %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.0), // Test case 34: Acos 1.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Acos %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.0), // Test case 35: Atan 0.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Atan %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.0), // Test case 36: Exp 0.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Exp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1.0), // Test case 37: Log 1.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Log %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.0), // Test case 38: Exp2 2.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Exp2 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 4.0), // Test case 39: Log2 4.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Log2 %float_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2.0), // Test case 40: Sqrt 4.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Sqrt %float_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2.0), // Test case 41: Atan2 0.0 1.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Atan2 %float_0 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.0), // Test case 42: Pow 2.0 3.0 InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %float %1 Pow %float_2 %float_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 8.0) )); // clang-format on using DoubleInstructionFoldingTest = ::testing::TestWithParam<InstructionFoldingCase<double>>; TEST_P(DoubleInstructionFoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); // Make sure the instruction folded as expected. EXPECT_TRUE(succeeded); if (inst != nullptr) { EXPECT_EQ(inst->opcode(), SpvOpCopyObject); inst = def_use_mgr->GetDef(inst->GetSingleWordInOperand(0)); EXPECT_EQ(inst->opcode(), SpvOpConstant); analysis::ConstantManager* const_mrg = context->get_constant_mgr(); const analysis::FloatConstant* result = const_mrg->GetConstantFromInst(inst)->AsFloatConstant(); EXPECT_NE(result, nullptr); if (result != nullptr) { EXPECT_EQ(result->GetDoubleValue(), tc.expected_result); } } } // clang-format off INSTANTIATE_TEST_SUITE_P(DoubleConstantFoldingTest, DoubleInstructionFoldingTest, ::testing::Values( // Test case 0: Fold 2.0 - 1.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFSub %double %double_2 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1.0), // Test case 1: Fold 2.0 + 1.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFAdd %double %double_2 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3.0), // Test case 2: Fold 3.0 * 2.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFMul %double %double_3 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 6.0), // Test case 3: Fold 1.0 / 2.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFDiv %double %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.5), // Test case 4: Fold 1.0 / 0.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFDiv %double %double_1 %double_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, std::numeric_limits<double>::infinity()), // Test case 5: Fold -1.0 / 0.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFDiv %double %double_n1 %double_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, -std::numeric_limits<double>::infinity()), // Test case 6: Fold (2.0, 3.0) dot (2.0, 0.5) InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpDot %double %v2double_2_3 %v2double_2_0p5\n" + "OpReturn\n" + "OpFunctionEnd", 2, 5.5f), // Test case 7: Fold (0.0, 0.0) dot v InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%v = OpVariable %_ptr_v2double Function\n" + "%2 = OpLoad %v2double %v\n" + "%3 = OpDot %double %v2double_0_0 %2\n" + "OpReturn\n" + "OpFunctionEnd", 3, 0.0f), // Test case 8: Fold v dot (0.0, 0.0) InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%v = OpVariable %_ptr_v2double Function\n" + "%2 = OpLoad %v2double %v\n" + "%3 = OpDot %double %2 %v2double_0_0\n" + "OpReturn\n" + "OpFunctionEnd", 3, 0.0f), // Test case 9: Fold Null dot v InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%v = OpVariable %_ptr_v2double Function\n" + "%2 = OpLoad %v2double %v\n" + "%3 = OpDot %double %v2double_null %2\n" + "OpReturn\n" + "OpFunctionEnd", 3, 0.0f), // Test case 10: Fold v dot Null InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%v = OpVariable %_ptr_v2double Function\n" + "%2 = OpLoad %v2double %v\n" + "%3 = OpDot %double %2 %v2double_null\n" + "OpReturn\n" + "OpFunctionEnd", 3, 0.0f), // Test case 11: Fold -2.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFNegate %double %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, -2), // Test case 12: FMin 1.0 4.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %double %1 FMin %double_1 %double_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1.0), // Test case 13: FMin 4.0 0.2 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %double %1 FMin %double_4 %double_0p2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.2), // Test case 14: FMax 1.0 4.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %double %1 FMax %double_1 %double_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 4.0), // Test case 15: FMax 1.0 0.2 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %double %1 FMax %double_1 %double_0p2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1.0), // Test case 16: FClamp 1.0 0.2 4.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %double %1 FClamp %double_1 %double_0p2 %double_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 1.0), // Test case 17: FClamp 0.2 2.0 4.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %double %1 FClamp %double_0p2 %double_2 %double_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2.0), // Test case 18: FClamp 5.0 2.0 4.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpExtInst %double %1 FClamp %double_5 %double_2 %double_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 4.0), // Test case 19: FClamp 1.0 2.0 x InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%undef = OpUndef %double\n" + "%2 = OpExtInst %double %1 FClamp %double_1 %double_2 %undef\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2.0), // Test case 20: FClamp 1.0 x 0.5 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%undef = OpUndef %double\n" + "%2 = OpExtInst %double %1 FClamp %double_1 %undef %double_0p5\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0.5), // Test case 21: Sqrt 4.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%undef = OpUndef %double\n" + "%2 = OpExtInst %double %1 Sqrt %double_4\n" + "OpReturn\n" + "OpFunctionEnd", 2, 2.0), // Test case 22: Pow 2.0 3.0 InstructionFoldingCase<double>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%undef = OpUndef %double\n" + "%2 = OpExtInst %double %1 Pow %double_2 %double_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 8.0) )); // clang-format on // clang-format off INSTANTIATE_TEST_SUITE_P(DoubleOrderedCompareConstantFoldingTest, BooleanInstructionFoldingTest, ::testing::Values( // Test case 0: fold 1.0 == 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdEqual %bool %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 1: fold 1.0 != 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdNotEqual %bool %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 2: fold 1.0 < 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdLessThan %bool %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 3: fold 1.0 > 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdGreaterThan %bool %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 4: fold 1.0 <= 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdLessThanEqual %bool %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 5: fold 1.0 >= 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdGreaterThanEqual %bool %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 6: fold 1.0 == 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdEqual %bool %double_1 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 7: fold 1.0 != 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdNotEqual %bool %double_1 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 8: fold 1.0 < 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdLessThan %bool %double_1 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 9: fold 1.0 > 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdGreaterThan %bool %double_1 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 10: fold 1.0 <= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdLessThanEqual %bool %double_1 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 11: fold 1.0 >= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdGreaterThanEqual %bool %double_1 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 12: fold 2.0 < 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdLessThan %bool %double_2 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 13: fold 2.0 > 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdGreaterThan %bool %double_2 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 14: fold 2.0 <= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdLessThanEqual %bool %double_2 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 15: fold 2.0 >= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdGreaterThanEqual %bool %double_2 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true) )); INSTANTIATE_TEST_SUITE_P(DoubleUnorderedCompareConstantFoldingTest, BooleanInstructionFoldingTest, ::testing::Values( // Test case 0: fold 1.0 == 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordEqual %bool %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 1: fold 1.0 != 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordNotEqual %bool %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 2: fold 1.0 < 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordLessThan %bool %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 3: fold 1.0 > 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordGreaterThan %bool %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 4: fold 1.0 <= 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordLessThanEqual %bool %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 5: fold 1.0 >= 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordGreaterThanEqual %bool %double_1 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 6: fold 1.0 == 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordEqual %bool %double_1 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 7: fold 1.0 != 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordNotEqual %bool %double_1 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 8: fold 1.0 < 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordLessThan %bool %double_1 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 9: fold 1.0 > 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordGreaterThan %bool %double_1 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 10: fold 1.0 <= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordLessThanEqual %bool %double_1 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 11: fold 1.0 >= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordGreaterThanEqual %bool %double_1 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 12: fold 2.0 < 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordLessThan %bool %double_2 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 13: fold 2.0 > 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordGreaterThan %bool %double_2 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 14: fold 2.0 <= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordLessThanEqual %bool %double_2 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 15: fold 2.0 >= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordGreaterThanEqual %bool %double_2 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true) )); INSTANTIATE_TEST_SUITE_P(FloatOrderedCompareConstantFoldingTest, BooleanInstructionFoldingTest, ::testing::Values( // Test case 0: fold 1.0 == 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdEqual %bool %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 1: fold 1.0 != 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdNotEqual %bool %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 2: fold 1.0 < 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdLessThan %bool %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 3: fold 1.0 > 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdGreaterThan %bool %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 4: fold 1.0 <= 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdLessThanEqual %bool %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 5: fold 1.0 >= 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdGreaterThanEqual %bool %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 6: fold 1.0 == 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdEqual %bool %float_1 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 7: fold 1.0 != 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdNotEqual %bool %float_1 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 8: fold 1.0 < 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdLessThan %bool %float_1 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 9: fold 1.0 > 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdGreaterThan %bool %float_1 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 10: fold 1.0 <= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdLessThanEqual %bool %float_1 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 11: fold 1.0 >= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdGreaterThanEqual %bool %float_1 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 12: fold 2.0 < 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdLessThan %bool %float_2 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 13: fold 2.0 > 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdGreaterThan %bool %float_2 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 14: fold 2.0 <= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdLessThanEqual %bool %float_2 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 15: fold 2.0 >= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdGreaterThanEqual %bool %float_2 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true) )); INSTANTIATE_TEST_SUITE_P(FloatUnorderedCompareConstantFoldingTest, BooleanInstructionFoldingTest, ::testing::Values( // Test case 0: fold 1.0 == 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordEqual %bool %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 1: fold 1.0 != 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordNotEqual %bool %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 2: fold 1.0 < 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordLessThan %bool %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 3: fold 1.0 > 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordGreaterThan %bool %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 4: fold 1.0 <= 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordLessThanEqual %bool %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 5: fold 1.0 >= 2.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordGreaterThanEqual %bool %float_1 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 6: fold 1.0 == 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordEqual %bool %float_1 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 7: fold 1.0 != 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordNotEqual %bool %float_1 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 8: fold 1.0 < 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordLessThan %bool %float_1 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 9: fold 1.0 > 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordGreaterThan %bool %float_1 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 10: fold 1.0 <= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordLessThanEqual %bool %float_1 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 11: fold 1.0 >= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordGreaterThanEqual %bool %float_1 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 12: fold 2.0 < 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordLessThan %bool %float_2 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 13: fold 2.0 > 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordGreaterThan %bool %float_2 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 14: fold 2.0 <= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordLessThanEqual %bool %float_2 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 15: fold 2.0 >= 1.0 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordGreaterThanEqual %bool %float_2 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true) )); INSTANTIATE_TEST_SUITE_P(DoubleNaNCompareConstantFoldingTest, BooleanInstructionFoldingTest, ::testing::Values( // Test case 0: fold NaN == 0 (ord) InstructionFoldingCase<bool>( HeaderWithNaN() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdEqual %bool %double_nan %double_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 1: fold NaN == NaN (unord) InstructionFoldingCase<bool>( HeaderWithNaN() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordEqual %bool %double_nan %double_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 2: fold NaN != NaN (ord) InstructionFoldingCase<bool>( HeaderWithNaN() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdNotEqual %bool %double_nan %double_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 3: fold NaN != NaN (unord) InstructionFoldingCase<bool>( HeaderWithNaN() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordNotEqual %bool %double_nan %double_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, true) )); INSTANTIATE_TEST_SUITE_P(FloatNaNCompareConstantFoldingTest, BooleanInstructionFoldingTest, ::testing::Values( // Test case 0: fold NaN == 0 (ord) InstructionFoldingCase<bool>( HeaderWithNaN() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdEqual %bool %float_nan %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 1: fold NaN == NaN (unord) InstructionFoldingCase<bool>( HeaderWithNaN() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordEqual %bool %float_nan %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 2: fold NaN != NaN (ord) InstructionFoldingCase<bool>( HeaderWithNaN() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFOrdNotEqual %bool %float_nan %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, false), // Test case 3: fold NaN != NaN (unord) InstructionFoldingCase<bool>( HeaderWithNaN() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFUnordNotEqual %bool %float_nan %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, true) )); // clang-format on template <class ResultType> struct InstructionFoldingCaseWithMap { InstructionFoldingCaseWithMap(const std::string& tb, uint32_t id, ResultType result, std::function<uint32_t(uint32_t)> map) : test_body(tb), id_to_fold(id), expected_result(result), id_map(map) {} std::string test_body; uint32_t id_to_fold; ResultType expected_result; std::function<uint32_t(uint32_t)> id_map; }; using IntegerInstructionFoldingTestWithMap = ::testing::TestWithParam<InstructionFoldingCaseWithMap<uint32_t>>; TEST_P(IntegerInstructionFoldingTestWithMap, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); inst = context->get_instruction_folder().FoldInstructionToConstant(inst, tc.id_map); // Make sure the instruction folded as expected. EXPECT_NE(inst, nullptr); if (inst != nullptr) { EXPECT_EQ(inst->opcode(), SpvOpConstant); analysis::ConstantManager* const_mrg = context->get_constant_mgr(); const analysis::IntConstant* result = const_mrg->GetConstantFromInst(inst)->AsIntConstant(); EXPECT_NE(result, nullptr); if (result != nullptr) { EXPECT_EQ(result->GetU32BitValue(), tc.expected_result); } } } // clang-format off INSTANTIATE_TEST_SUITE_P(TestCase, IntegerInstructionFoldingTestWithMap, ::testing::Values( // Test case 0: fold %3 = 0; %3 * n InstructionFoldingCaseWithMap<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%3 = OpCopyObject %int %int_0\n" "%2 = OpIMul %int %3 %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0, [](uint32_t id) {return (id == 3 ? INT_0_ID : id);}) )); // clang-format on using BooleanInstructionFoldingTestWithMap = ::testing::TestWithParam<InstructionFoldingCaseWithMap<bool>>; TEST_P(BooleanInstructionFoldingTestWithMap, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); inst = context->get_instruction_folder().FoldInstructionToConstant(inst, tc.id_map); // Make sure the instruction folded as expected. EXPECT_NE(inst, nullptr); if (inst != nullptr) { std::vector<SpvOp> bool_opcodes = {SpvOpConstantTrue, SpvOpConstantFalse}; EXPECT_THAT(bool_opcodes, Contains(inst->opcode())); analysis::ConstantManager* const_mrg = context->get_constant_mgr(); const analysis::BoolConstant* result = const_mrg->GetConstantFromInst(inst)->AsBoolConstant(); EXPECT_NE(result, nullptr); if (result != nullptr) { EXPECT_EQ(result->value(), tc.expected_result); } } } // clang-format off INSTANTIATE_TEST_SUITE_P(TestCase, BooleanInstructionFoldingTestWithMap, ::testing::Values( // Test case 0: fold %3 = true; %3 || n InstructionFoldingCaseWithMap<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_bool Function\n" + "%load = OpLoad %bool %n\n" + "%3 = OpCopyObject %bool %true\n" + "%2 = OpLogicalOr %bool %3 %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, true, [](uint32_t id) {return (id == 3 ? TRUE_ID : id);}) )); // clang-format on using GeneralInstructionFoldingTest = ::testing::TestWithParam<InstructionFoldingCase<uint32_t>>; TEST_P(GeneralInstructionFoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); std::unique_ptr<Instruction> original_inst(inst->Clone(context.get())); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); // Make sure the instruction folded as expected. EXPECT_EQ(inst->result_id(), original_inst->result_id()); EXPECT_EQ(inst->type_id(), original_inst->type_id()); EXPECT_TRUE((!succeeded) == (tc.expected_result == 0)); if (succeeded) { EXPECT_EQ(inst->opcode(), SpvOpCopyObject); EXPECT_EQ(inst->GetSingleWordInOperand(0), tc.expected_result); } else { EXPECT_EQ(inst->NumInOperands(), original_inst->NumInOperands()); for (uint32_t i = 0; i < inst->NumInOperands(); ++i) { EXPECT_EQ(inst->GetOperand(i), original_inst->GetOperand(i)); } } } // clang-format off INSTANTIATE_TEST_SUITE_P(IntegerArithmeticTestCases, GeneralInstructionFoldingTest, ::testing::Values( // Test case 0: Don't fold n * m InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%m = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%load_m = OpLoad %int %m\n" + "%2 = OpIMul %int %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 1: Don't fold n / m (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%m = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%load_m = OpLoad %uint %m\n" + "%2 = OpUDiv %uint %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 2: Don't fold n / m (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%m = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%load_m = OpLoad %int %m\n" + "%2 = OpSDiv %int %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 3: Don't fold n remainder m InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%m = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%load_m = OpLoad %int %m\n" + "%2 = OpSRem %int %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 4: Don't fold n % m (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%m = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%load_m = OpLoad %int %m\n" + "%2 = OpSMod %int %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 5: Don't fold n % m (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%m = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%load_m = OpLoad %uint %m\n" + "%2 = OpUMod %int %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 6: Don't fold n << m InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%m = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%load_m = OpLoad %uint %m\n" + "%2 = OpShiftRightLogical %int %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 7: Don't fold n >> m InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%m = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%load_m = OpLoad %uint %m\n" + "%2 = OpShiftLeftLogical %int %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 8: Don't fold n | m InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%m = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%load_m = OpLoad %uint %m\n" + "%2 = OpBitwiseOr %int %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 9: Don't fold n & m InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%m = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%load_m = OpLoad %uint %m\n" + "%2 = OpBitwiseAnd %int %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 10: Don't fold n < m (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%m = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%load_m = OpLoad %uint %m\n" + "%2 = OpULessThan %bool %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 11: Don't fold n > m (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%m = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%load_m = OpLoad %uint %m\n" + "%2 = OpUGreaterThan %bool %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 12: Don't fold n <= m (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%m = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%load_m = OpLoad %uint %m\n" + "%2 = OpULessThanEqual %bool %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 13: Don't fold n >= m (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%m = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%load_m = OpLoad %uint %m\n" + "%2 = OpUGreaterThanEqual %bool %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 14: Don't fold n < m (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%m = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%load_m = OpLoad %int %m\n" + "%2 = OpULessThan %bool %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 15: Don't fold n > m (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%m = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%load_m = OpLoad %int %m\n" + "%2 = OpUGreaterThan %bool %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 16: Don't fold n <= m (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%m = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%load_m = OpLoad %int %m\n" + "%2 = OpULessThanEqual %bool %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 17: Don't fold n >= m (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%m = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%load_m = OpLoad %int %m\n" + "%2 = OpUGreaterThanEqual %bool %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 18: Don't fold n || m InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_bool Function\n" + "%m = OpVariable %_ptr_bool Function\n" + "%load_n = OpLoad %bool %n\n" + "%load_m = OpLoad %bool %m\n" + "%2 = OpLogicalOr %bool %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 19: Don't fold n && m InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_bool Function\n" + "%m = OpVariable %_ptr_bool Function\n" + "%load_n = OpLoad %bool %n\n" + "%load_m = OpLoad %bool %m\n" + "%2 = OpLogicalAnd %bool %load_n %load_m\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 20: Don't fold n * 3 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%2 = OpIMul %int %load_n %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 21: Don't fold n / 3 (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%2 = OpUDiv %uint %load_n %uint_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 22: Don't fold n / 3 (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%2 = OpSDiv %int %load_n %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 23: Don't fold n remainder 3 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%2 = OpSRem %int %load_n %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 24: Don't fold n % 3 (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%2 = OpSMod %int %load_n %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 25: Don't fold n % 3 (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%2 = OpUMod %int %load_n %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 26: Don't fold n << 3 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%2 = OpShiftRightLogical %int %load_n %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 27: Don't fold n >> 3 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%2 = OpShiftLeftLogical %int %load_n %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 28: Don't fold n | 3 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%2 = OpBitwiseOr %int %load_n %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 29: Don't fold n & 3 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%2 = OpBitwiseAnd %uint %load_n %uint_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 30: Don't fold n < 3 (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%2 = OpULessThan %bool %load_n %uint_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 31: Don't fold n > 3 (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%2 = OpUGreaterThan %bool %load_n %uint_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 32: Don't fold n <= 3 (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%2 = OpULessThanEqual %bool %load_n %uint_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 33: Don't fold n >= 3 (unsigned) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%load_n = OpLoad %uint %n\n" + "%2 = OpUGreaterThanEqual %bool %load_n %uint_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 34: Don't fold n < 3 (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%2 = OpULessThan %bool %load_n %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 35: Don't fold n > 3 (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%2 = OpUGreaterThan %bool %load_n %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 36: Don't fold n <= 3 (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%2 = OpULessThanEqual %bool %load_n %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 37: Don't fold n >= 3 (signed) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load_n = OpLoad %int %n\n" + "%2 = OpUGreaterThanEqual %bool %load_n %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 38: Don't fold 2 + 3 (long), bad length InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpIAdd %long %long_2 %long_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 39: Don't fold 2 + 3 (short), bad length InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpIAdd %short %short_2 %short_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 40: fold 1*n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%3 = OpLoad %int %n\n" + "%2 = OpIMul %int %int_1 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 41: fold n*1 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%3 = OpLoad %int %n\n" + "%2 = OpIMul %int %3 %int_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3) )); INSTANTIATE_TEST_SUITE_P(CompositeExtractFoldingTest, GeneralInstructionFoldingTest, ::testing::Values( // Test case 0: fold Insert feeding extract InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %n\n" + "%3 = OpCompositeInsert %v4int %2 %v4int_0_0_0_0 0\n" + "%4 = OpCompositeInsert %v4int %int_1 %3 1\n" + "%5 = OpCompositeInsert %v4int %int_1 %4 2\n" + "%6 = OpCompositeInsert %v4int %int_1 %5 3\n" + "%7 = OpCompositeExtract %int %6 0\n" + "OpReturn\n" + "OpFunctionEnd", 7, 2), // Test case 1: fold Composite construct feeding extract (position 0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %n\n" + "%3 = OpCompositeConstruct %v4int %2 %int_0 %int_0 %int_0\n" + "%4 = OpCompositeExtract %int %3 0\n" + "OpReturn\n" + "OpFunctionEnd", 4, 2), // Test case 2: fold Composite construct feeding extract (position 3) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %n\n" + "%3 = OpCompositeConstruct %v4int %2 %int_0 %int_0 %100\n" + "%4 = OpCompositeExtract %int %3 3\n" + "OpReturn\n" + "OpFunctionEnd", 4, INT_0_ID), // Test case 3: fold Composite construct with vectors feeding extract (scalar element) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %n\n" + "%3 = OpCompositeConstruct %v2int %2 %int_0\n" + "%4 = OpCompositeConstruct %v4int %3 %int_0 %100\n" + "%5 = OpCompositeExtract %int %4 3\n" + "OpReturn\n" + "OpFunctionEnd", 5, INT_0_ID), // Test case 4: fold Composite construct with vectors feeding extract (start of vector element) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %n\n" + "%3 = OpCompositeConstruct %v2int %2 %int_0\n" + "%4 = OpCompositeConstruct %v4int %3 %int_0 %100\n" + "%5 = OpCompositeExtract %int %4 0\n" + "OpReturn\n" + "OpFunctionEnd", 5, 2), // Test case 5: fold Composite construct with vectors feeding extract (middle of vector element) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %n\n" + "%3 = OpCompositeConstruct %v2int %int_0 %2\n" + "%4 = OpCompositeConstruct %v4int %3 %int_0 %100\n" + "%5 = OpCompositeExtract %int %4 1\n" + "OpReturn\n" + "OpFunctionEnd", 5, 2), // Test case 6: fold Composite construct with multiple indices. InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %n\n" + "%3 = OpCompositeConstruct %v2int %int_0 %2\n" + "%4 = OpCompositeConstruct %struct_v2int_int_int %3 %int_0 %100\n" + "%5 = OpCompositeExtract %int %4 0 1\n" + "OpReturn\n" + "OpFunctionEnd", 5, 2), // Test case 7: fold constant extract. InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpCompositeExtract %int %102 1\n" + "OpReturn\n" + "OpFunctionEnd", 2, INT_7_ID), // Test case 8: constant struct has OpUndef InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpCompositeExtract %int %struct_undef_0_0 0 1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 9: Extracting a member of element inserted via Insert InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_struct_v2int_int_int Function\n" + "%2 = OpLoad %struct_v2int_int_int %n\n" + "%3 = OpCompositeInsert %struct_v2int_int_int %102 %2 0\n" + "%4 = OpCompositeExtract %int %3 0 1\n" + "OpReturn\n" + "OpFunctionEnd", 4, 103), // Test case 10: Extracting a element that is partially changed by Insert. (Don't fold) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_struct_v2int_int_int Function\n" + "%2 = OpLoad %struct_v2int_int_int %n\n" + "%3 = OpCompositeInsert %struct_v2int_int_int %int_0 %2 0 1\n" + "%4 = OpCompositeExtract %v2int %3 0\n" + "OpReturn\n" + "OpFunctionEnd", 4, 0), // Test case 11: Extracting from result of vector shuffle (first input) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v2int Function\n" + "%2 = OpLoad %v2int %n\n" + "%3 = OpVectorShuffle %v2int %102 %2 3 0\n" + "%4 = OpCompositeExtract %int %3 1\n" + "OpReturn\n" + "OpFunctionEnd", 4, INT_7_ID), // Test case 12: Extracting from result of vector shuffle (second input) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v2int Function\n" + "%2 = OpLoad %v2int %n\n" + "%3 = OpVectorShuffle %v2int %2 %102 2 0\n" + "%4 = OpCompositeExtract %int %3 0\n" + "OpReturn\n" + "OpFunctionEnd", 4, INT_7_ID), // Test case 13: https://github.com/KhronosGroup/SPIRV-Tools/issues/2608 // Out of bounds access. Do not fold. InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1\n" + "%3 = OpCompositeExtract %float %2 4\n" + "OpReturn\n" + "OpFunctionEnd", 3, 0) )); INSTANTIATE_TEST_SUITE_P(CompositeConstructFoldingTest, GeneralInstructionFoldingTest, ::testing::Values( // Test case 0: fold Extracts feeding construct InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpCopyObject %v4int %v4int_0_0_0_0\n" + "%3 = OpCompositeExtract %int %2 0\n" + "%4 = OpCompositeExtract %int %2 1\n" + "%5 = OpCompositeExtract %int %2 2\n" + "%6 = OpCompositeExtract %int %2 3\n" + "%7 = OpCompositeConstruct %v4int %3 %4 %5 %6\n" + "OpReturn\n" + "OpFunctionEnd", 7, 2), // Test case 1: Don't fold Extracts feeding construct (Different source) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpCopyObject %v4int %v4int_0_0_0_0\n" + "%3 = OpCompositeExtract %int %2 0\n" + "%4 = OpCompositeExtract %int %2 1\n" + "%5 = OpCompositeExtract %int %2 2\n" + "%6 = OpCompositeExtract %int %v4int_0_0_0_0 3\n" + "%7 = OpCompositeConstruct %v4int %3 %4 %5 %6\n" + "OpReturn\n" + "OpFunctionEnd", 7, 0), // Test case 2: Don't fold Extracts feeding construct (bad indices) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpCopyObject %v4int %v4int_0_0_0_0\n" + "%3 = OpCompositeExtract %int %2 0\n" + "%4 = OpCompositeExtract %int %2 0\n" + "%5 = OpCompositeExtract %int %2 2\n" + "%6 = OpCompositeExtract %int %2 3\n" + "%7 = OpCompositeConstruct %v4int %3 %4 %5 %6\n" + "OpReturn\n" + "OpFunctionEnd", 7, 0), // Test case 3: Don't fold Extracts feeding construct (different type) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpCopyObject %struct_v2int_int_int %struct_v2int_int_int_null\n" + "%3 = OpCompositeExtract %v2int %2 0\n" + "%4 = OpCompositeExtract %int %2 1\n" + "%5 = OpCompositeExtract %int %2 2\n" + "%7 = OpCompositeConstruct %v4int %3 %4 %5\n" + "OpReturn\n" + "OpFunctionEnd", 7, 0), // Test case 4: Fold construct with constants to constant. InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpCompositeConstruct %v2int %103 %103\n" + "OpReturn\n" + "OpFunctionEnd", 2, VEC2_0_ID), // Test case 5: Don't segfault when trying to fold an OpCompositeConstruct // for an empty struct, and we reached the id limit. InstructionFoldingCase<uint32_t>( Header() + "%empty_struct = OpTypeStruct\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%4194303 = OpCompositeConstruct %empty_struct\n" + "OpReturn\n" + "OpFunctionEnd", 4194303, 0) )); INSTANTIATE_TEST_SUITE_P(PhiFoldingTest, GeneralInstructionFoldingTest, ::testing::Values( // Test case 0: Fold phi with the same values for all edges. InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + " OpBranchConditional %true %l1 %l2\n" + "%l1 = OpLabel\n" + " OpBranch %merge_lab\n" + "%l2 = OpLabel\n" + " OpBranch %merge_lab\n" + "%merge_lab = OpLabel\n" + "%2 = OpPhi %int %100 %l1 %100 %l2\n" + "OpReturn\n" + "OpFunctionEnd", 2, INT_0_ID), // Test case 1: Fold phi in pass through loop. InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + " OpBranch %l1\n" + "%l1 = OpLabel\n" + "%2 = OpPhi %int %100 %main_lab %2 %l1\n" + " OpBranchConditional %true %l1 %merge_lab\n" + "%merge_lab = OpLabel\n" + "OpReturn\n" + "OpFunctionEnd", 2, INT_0_ID), // Test case 2: Don't Fold phi because of different values. InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + " OpBranch %l1\n" + "%l1 = OpLabel\n" + "%2 = OpPhi %int %int_0 %main_lab %int_3 %l1\n" + " OpBranchConditional %true %l1 %merge_lab\n" + "%merge_lab = OpLabel\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0) )); INSTANTIATE_TEST_SUITE_P(FloatRedundantFoldingTest, GeneralInstructionFoldingTest, ::testing::Values( // Test case 0: Don't fold n + 1.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFAdd %float %3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 1: Don't fold n - 1.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFSub %float %3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 2: Don't fold n * 2.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFMul %float %3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 3: Fold n + 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFAdd %float %3 %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 4: Fold 0.0 + n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFAdd %float %float_0 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 5: Fold n - 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFSub %float %3 %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 6: Fold n * 1.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFMul %float %3 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 7: Fold 1.0 * n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFMul %float %float_1 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 8: Fold n / 1.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFDiv %float %3 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 9: Fold n * 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFMul %float %3 %104\n" + "OpReturn\n" + "OpFunctionEnd", 2, FLOAT_0_ID), // Test case 10: Fold 0.0 * n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFMul %float %104 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, FLOAT_0_ID), // Test case 11: Fold 0.0 / n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFDiv %float %104 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, FLOAT_0_ID), // Test case 12: Don't fold mix(a, b, 2.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%a = OpVariable %_ptr_float Function\n" + "%b = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %a\n" + "%4 = OpLoad %float %b\n" + "%2 = OpExtInst %float %1 FMix %3 %4 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 13: Fold mix(a, b, 0.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%a = OpVariable %_ptr_float Function\n" + "%b = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %a\n" + "%4 = OpLoad %float %b\n" + "%2 = OpExtInst %float %1 FMix %3 %4 %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 14: Fold mix(a, b, 1.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%a = OpVariable %_ptr_float Function\n" + "%b = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %a\n" + "%4 = OpLoad %float %b\n" + "%2 = OpExtInst %float %1 FMix %3 %4 %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 4), // Test case 15: Fold vector fadd with null InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%a = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %v2float %a\n" + "%3 = OpFAdd %v2float %2 %v2float_null\n" + "OpReturn\n" + "OpFunctionEnd", 3, 2), // Test case 16: Fold vector fadd with null InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%a = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %v2float %a\n" + "%3 = OpFAdd %v2float %v2float_null %2\n" + "OpReturn\n" + "OpFunctionEnd", 3, 2), // Test case 17: Fold vector fsub with null InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%a = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %v2float %a\n" + "%3 = OpFSub %v2float %2 %v2float_null\n" + "OpReturn\n" + "OpFunctionEnd", 3, 2), // Test case 18: Fold 0.0(half) * n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_half Function\n" + "%3 = OpLoad %half %n\n" + "%2 = OpFMul %half %108 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, HALF_0_ID), // Test case 19: Don't fold 1.0(half) * n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_half Function\n" + "%3 = OpLoad %half %n\n" + "%2 = OpFMul %half %half_1 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 20: Don't fold 1.0 * 1.0 (half) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFMul %half %half_1 %half_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 21: Don't fold (0.0, 1.0) * (0.0, 1.0) (half) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFMul %v2half %half_0_1 %half_0_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 22: Don't fold (0.0, 1.0) dotp (0.0, 1.0) (half) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpDot %half %half_0_1 %half_0_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0) )); INSTANTIATE_TEST_SUITE_P(DoubleRedundantFoldingTest, GeneralInstructionFoldingTest, ::testing::Values( // Test case 0: Don't fold n + 1.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFAdd %double %3 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 1: Don't fold n - 1.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFSub %double %3 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 2: Don't fold n * 2.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFMul %double %3 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 3: Fold n + 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFAdd %double %3 %double_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 4: Fold 0.0 + n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFAdd %double %double_0 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 5: Fold n - 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFSub %double %3 %double_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 6: Fold n * 1.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFMul %double %3 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 7: Fold 1.0 * n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFMul %double %double_1 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 8: Fold n / 1.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFDiv %double %3 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 9: Fold n * 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFMul %double %3 %105\n" + "OpReturn\n" + "OpFunctionEnd", 2, DOUBLE_0_ID), // Test case 10: Fold 0.0 * n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFMul %double %105 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, DOUBLE_0_ID), // Test case 11: Fold 0.0 / n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFDiv %double %105 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, DOUBLE_0_ID), // Test case 12: Don't fold mix(a, b, 2.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%a = OpVariable %_ptr_double Function\n" + "%b = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %a\n" + "%4 = OpLoad %double %b\n" + "%2 = OpExtInst %double %1 FMix %3 %4 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 13: Fold mix(a, b, 0.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%a = OpVariable %_ptr_double Function\n" + "%b = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %a\n" + "%4 = OpLoad %double %b\n" + "%2 = OpExtInst %double %1 FMix %3 %4 %double_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 14: Fold mix(a, b, 1.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%a = OpVariable %_ptr_double Function\n" + "%b = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %a\n" + "%4 = OpLoad %double %b\n" + "%2 = OpExtInst %double %1 FMix %3 %4 %double_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 4) )); INSTANTIATE_TEST_SUITE_P(FloatVectorRedundantFoldingTest, GeneralInstructionFoldingTest, ::testing::Values( // Test case 0: Don't fold a * vec4(0.0, 0.0, 0.0, 1.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4float Function\n" + "%3 = OpLoad %v4float %n\n" + "%2 = OpFMul %v4float %3 %v4float_0_0_0_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 1: Fold a * vec4(0.0, 0.0, 0.0, 0.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4float Function\n" + "%3 = OpLoad %v4float %n\n" + "%2 = OpFMul %v4float %3 %106\n" + "OpReturn\n" + "OpFunctionEnd", 2, VEC4_0_ID), // Test case 2: Fold a * vec4(1.0, 1.0, 1.0, 1.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4float Function\n" + "%3 = OpLoad %v4float %n\n" + "%2 = OpFMul %v4float %3 %v4float_1_1_1_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3) )); INSTANTIATE_TEST_SUITE_P(DoubleVectorRedundantFoldingTest, GeneralInstructionFoldingTest, ::testing::Values( // Test case 0: Don't fold a * vec4(0.0, 0.0, 0.0, 1.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%3 = OpLoad %v4double %n\n" + "%2 = OpFMul %v4double %3 %v4double_0_0_0_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 1: Fold a * vec4(0.0, 0.0, 0.0, 0.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%3 = OpLoad %v4double %n\n" + "%2 = OpFMul %v4double %3 %106\n" + "OpReturn\n" + "OpFunctionEnd", 2, DVEC4_0_ID), // Test case 2: Fold a * vec4(1.0, 1.0, 1.0, 1.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%3 = OpLoad %v4double %n\n" + "%2 = OpFMul %v4double %3 %v4double_1_1_1_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3) )); INSTANTIATE_TEST_SUITE_P(IntegerRedundantFoldingTest, GeneralInstructionFoldingTest, ::testing::Values( // Test case 0: Don't fold n + 1 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%3 = OpLoad %uint %n\n" + "%2 = OpIAdd %uint %3 %uint_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 1: Don't fold 1 + n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%3 = OpLoad %uint %n\n" + "%2 = OpIAdd %uint %uint_1 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 2: Fold n + 0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%3 = OpLoad %uint %n\n" + "%2 = OpIAdd %uint %3 %uint_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 3: Fold 0 + n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_uint Function\n" + "%3 = OpLoad %uint %n\n" + "%2 = OpIAdd %uint %uint_0 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 4: Don't fold n + (1,0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v2int Function\n" + "%3 = OpLoad %v2int %n\n" + "%2 = OpIAdd %v2int %3 %v2int_1_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 5: Don't fold (1,0) + n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v2int Function\n" + "%3 = OpLoad %v2int %n\n" + "%2 = OpIAdd %v2int %v2int_1_0 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 6: Fold n + (0,0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v2int Function\n" + "%3 = OpLoad %v2int %n\n" + "%2 = OpIAdd %v2int %3 %v2int_0_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 7: Fold (0,0) + n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v2int Function\n" + "%3 = OpLoad %v2int %n\n" + "%2 = OpIAdd %v2int %v2int_0_0 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3) )); INSTANTIATE_TEST_SUITE_P(ClampAndCmpLHS, GeneralInstructionFoldingTest, ::testing::Values( // Test case 0: Don't Fold 0.0 < clamp(-1, 1) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFUnordLessThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 1: Don't Fold 0.0 < clamp(-1, 1) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFOrdLessThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 2: Don't Fold 0.0 <= clamp(-1, 1) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFUnordLessThanEqual %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 3: Don't Fold 0.0 <= clamp(-1, 1) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFOrdLessThanEqual %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 4: Don't Fold 0.0 > clamp(-1, 1) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFUnordGreaterThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 5: Don't Fold 0.0 > clamp(-1, 1) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFOrdGreaterThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 6: Don't Fold 0.0 >= clamp(-1, 1) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFUnordGreaterThanEqual %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 7: Don't Fold 0.0 >= clamp(-1, 1) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFOrdGreaterThanEqual %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 8: Don't Fold 0.0 < clamp(0, 1) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_0 %float_1\n" + "%2 = OpFUnordLessThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 9: Don't Fold 0.0 < clamp(0, 1) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_0 %float_1\n" + "%2 = OpFOrdLessThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 10: Don't Fold 0.0 > clamp(-1, 0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_0\n" + "%2 = OpFUnordGreaterThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 11: Don't Fold 0.0 > clamp(-1, 0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_0\n" + "%2 = OpFOrdGreaterThan %bool %float_0 %clamp\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0) )); INSTANTIATE_TEST_SUITE_P(ClampAndCmpRHS, GeneralInstructionFoldingTest, ::testing::Values( // Test case 0: Don't Fold clamp(-1, 1) < 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFUnordLessThan %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 1: Don't Fold clamp(-1, 1) < 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFOrdLessThan %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 2: Don't Fold clamp(-1, 1) <= 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFUnordLessThanEqual %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 3: Don't Fold clamp(-1, 1) <= 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFOrdLessThanEqual %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 4: Don't Fold clamp(-1, 1) > 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFUnordGreaterThan %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 5: Don't Fold clamp(-1, 1) > 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFOrdGreaterThan %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 6: Don't Fold clamp(-1, 1) >= 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFUnordGreaterThanEqual %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 7: Don't Fold clamp(-1, 1) >= 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_1\n" + "%2 = OpFOrdGreaterThanEqual %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 8: Don't Fold clamp(-1, 0) < 0.0 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_0\n" + "%2 = OpFUnordLessThan %bool %clamp %float_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 9: Don't Fold clamp(0, 1) < 1 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_0 %float_1\n" + "%2 = OpFOrdLessThan %bool %clamp %float_1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 10: Don't Fold clamp(-1, 0) > -1 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_0\n" + "%2 = OpFUnordGreaterThan %bool %clamp %float_n1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 11: Don't Fold clamp(-1, 0) > -1 InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%ld = OpLoad %float %n\n" + "%clamp = OpExtInst %float %1 FClamp %ld %float_n1 %float_0\n" + "%2 = OpFOrdGreaterThan %bool %clamp %float_n1\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0) )); INSTANTIATE_TEST_SUITE_P(FToIConstantFoldingTest, IntegerInstructionFoldingTest, ::testing::Values( // Test case 0: Fold int(3.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpConvertFToS %int %float_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 1: Fold uint(3.0) InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpConvertFToU %int %float_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3) )); INSTANTIATE_TEST_SUITE_P(IToFConstantFoldingTest, FloatInstructionFoldingTest, ::testing::Values( // Test case 0: Fold float(3) InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpConvertSToF %float %int_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3.0), // Test case 1: Fold float(3u) InstructionFoldingCase<float>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpConvertUToF %float %uint_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3.0) )); // clang-format on using ToNegateFoldingTest = ::testing::TestWithParam<InstructionFoldingCase<uint32_t>>; TEST_P(ToNegateFoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); std::unique_ptr<Instruction> original_inst(inst->Clone(context.get())); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); // Make sure the instruction folded as expected. EXPECT_EQ(inst->result_id(), original_inst->result_id()); EXPECT_EQ(inst->type_id(), original_inst->type_id()); EXPECT_TRUE((!succeeded) == (tc.expected_result == 0)); if (succeeded) { EXPECT_EQ(inst->opcode(), SpvOpFNegate); EXPECT_EQ(inst->GetSingleWordInOperand(0), tc.expected_result); } else { EXPECT_EQ(inst->NumInOperands(), original_inst->NumInOperands()); for (uint32_t i = 0; i < inst->NumInOperands(); ++i) { EXPECT_EQ(inst->GetOperand(i), original_inst->GetOperand(i)); } } } // clang-format off INSTANTIATE_TEST_SUITE_P(FloatRedundantSubFoldingTest, ToNegateFoldingTest, ::testing::Values( // Test case 0: Don't fold 1.0 - n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFSub %float %float_1 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 1: Fold 0.0 - n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %n\n" + "%2 = OpFSub %float %float_0 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 2: Don't fold (0,0,0,1) - n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4float Function\n" + "%3 = OpLoad %v4float %n\n" + "%2 = OpFSub %v4float %v4float_0_0_0_1 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 3: Fold (0,0,0,0) - n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4float Function\n" + "%3 = OpLoad %v4float %n\n" + "%2 = OpFSub %v4float %v4float_0_0_0_0 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3) )); INSTANTIATE_TEST_SUITE_P(DoubleRedundantSubFoldingTest, ToNegateFoldingTest, ::testing::Values( // Test case 0: Don't fold 1.0 - n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFSub %double %double_1 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 1: Fold 0.0 - n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%3 = OpLoad %double %n\n" + "%2 = OpFSub %double %double_0 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3), // Test case 2: Don't fold (0,0,0,1) - n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%3 = OpLoad %v4double %n\n" + "%2 = OpFSub %v4double %v4double_0_0_0_1 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 0), // Test case 3: Fold (0,0,0,0) - n InstructionFoldingCase<uint32_t>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%3 = OpLoad %v4double %n\n" + "%2 = OpFSub %v4double %v4double_0_0_0_0 %3\n" + "OpReturn\n" + "OpFunctionEnd", 2, 3) )); using MatchingInstructionFoldingTest = ::testing::TestWithParam<InstructionFoldingCase<bool>>; TEST_P(MatchingInstructionFoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); std::unique_ptr<Instruction> original_inst(inst->Clone(context.get())); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); EXPECT_EQ(succeeded, tc.expected_result); if (succeeded) { Match(tc.test_body, context.get()); } } INSTANTIATE_TEST_SUITE_P(RedundantIntegerMatching, MatchingInstructionFoldingTest, ::testing::Values( // Test case 0: Fold 0 + n (change sign) InstructionFoldingCase<bool>( Header() + "; CHECK: [[uint:%\\w+]] = OpTypeInt 32 0\n" + "; CHECK: %2 = OpBitcast [[uint]] %3\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%3 = OpLoad %uint %n\n" + "%2 = OpIAdd %uint %int_0 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 2, true), // Test case 0: Fold 0 + n (change sign) InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: %2 = OpBitcast [[int]] %3\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%3 = OpLoad %int %n\n" + "%2 = OpIAdd %int %uint_0 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 2, true) )); INSTANTIATE_TEST_SUITE_P(MergeNegateTest, MatchingInstructionFoldingTest, ::testing::Values( // Test case 0: fold consecutive fnegate // -(-x) = x InstructionFoldingCase<bool>( Header() + "; CHECK: [[ld:%\\w+]] = OpLoad [[float:%\\w+]]\n" + "; CHECK: %4 = OpCopyObject [[float]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFNegate %float %2\n" + "%4 = OpFNegate %float %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 1: fold fnegate(fmul with const). // -(x * 2.0) = x * -2.0 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_n2:%\\w+]] = OpConstant [[float]] -2{{[[:space:]]}}\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFMul [[float]] [[ld]] [[float_n2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFMul %float %2 %float_2\n" + "%4 = OpFNegate %float %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 2: fold fnegate(fmul with const). // -(2.0 * x) = x * 2.0 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_n2:%\\w+]] = OpConstant [[float]] -2{{[[:space:]]}}\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFMul [[float]] [[ld]] [[float_n2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFMul %float %float_2 %2\n" + "%4 = OpFNegate %float %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 3: fold fnegate(fdiv with const). // -(x / 2.0) = x * -0.5 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_n0p5:%\\w+]] = OpConstant [[float]] -0.5\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFMul [[float]] [[ld]] [[float_n0p5]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFDiv %float %2 %float_2\n" + "%4 = OpFNegate %float %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 4: fold fnegate(fdiv with const). // -(2.0 / x) = -2.0 / x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_n2:%\\w+]] = OpConstant [[float]] -2{{[[:space:]]}}\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFDiv [[float]] [[float_n2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFDiv %float %float_2 %2\n" + "%4 = OpFNegate %float %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 5: fold fnegate(fadd with const). // -(2.0 + x) = -2.0 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_n2:%\\w+]] = OpConstant [[float]] -2{{[[:space:]]}}\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[float_n2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFAdd %float %float_2 %2\n" + "%4 = OpFNegate %float %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 6: fold fnegate(fadd with const). // -(x + 2.0) = -2.0 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_n2:%\\w+]] = OpConstant [[float]] -2{{[[:space:]]}}\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[float_n2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFAdd %float %2 %float_2\n" + "%4 = OpFNegate %float %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 7: fold fnegate(fsub with const). // -(2.0 - x) = x - 2.0 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_2:%\\w+]] = OpConstant [[float]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[ld]] [[float_2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFSub %float %float_2 %2\n" + "%4 = OpFNegate %float %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 8: fold fnegate(fsub with const). // -(x - 2.0) = 2.0 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_2:%\\w+]] = OpConstant [[float]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[float_2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFSub %float %2 %float_2\n" + "%4 = OpFNegate %float %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 9: fold consecutive snegate // -(-x) = x InstructionFoldingCase<bool>( Header() + "; CHECK: [[ld:%\\w+]] = OpLoad [[int:%\\w+]]\n" + "; CHECK: %4 = OpCopyObject [[int]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpSNegate %int %2\n" + "%4 = OpSNegate %int %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 10: fold consecutive vector negate // -(-x) = x InstructionFoldingCase<bool>( Header() + "; CHECK: [[ld:%\\w+]] = OpLoad [[v2float:%\\w+]]\n" + "; CHECK: %4 = OpCopyObject [[v2float]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %v2float %var\n" + "%3 = OpFNegate %v2float %2\n" + "%4 = OpFNegate %v2float %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 11: fold snegate(iadd with const). // -(2 + x) = -2 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: OpConstant [[int]] -2147483648\n" + "; CHECK: [[int_n2:%\\w+]] = OpConstant [[int]] -2{{[[:space:]]}}\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[int]]\n" + "; CHECK: %4 = OpISub [[int]] [[int_n2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpIAdd %int %int_2 %2\n" + "%4 = OpSNegate %int %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 12: fold snegate(iadd with const). // -(x + 2) = -2 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: OpConstant [[int]] -2147483648\n" + "; CHECK: [[int_n2:%\\w+]] = OpConstant [[int]] -2{{[[:space:]]}}\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[int]]\n" + "; CHECK: %4 = OpISub [[int]] [[int_n2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpIAdd %int %2 %int_2\n" + "%4 = OpSNegate %int %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 13: fold snegate(isub with const). // -(2 - x) = x - 2 InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[int_2:%\\w+]] = OpConstant [[int]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[int]]\n" + "; CHECK: %4 = OpISub [[int]] [[ld]] [[int_2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpISub %int %int_2 %2\n" + "%4 = OpSNegate %int %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 14: fold snegate(isub with const). // -(x - 2) = 2 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[int_2:%\\w+]] = OpConstant [[int]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[int]]\n" + "; CHECK: %4 = OpISub [[int]] [[int_2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpISub %int %2 %int_2\n" + "%4 = OpSNegate %int %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 15: fold snegate(iadd with const). // -(x + 2) = -2 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[long:%\\w+]] = OpTypeInt 64 1\n" + "; CHECK: [[long_n2:%\\w+]] = OpConstant [[long]] -2{{[[:space:]]}}\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[long]]\n" + "; CHECK: %4 = OpISub [[long]] [[long_n2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_long Function\n" + "%2 = OpLoad %long %var\n" + "%3 = OpIAdd %long %2 %long_2\n" + "%4 = OpSNegate %long %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 16: fold snegate(isub with const). // -(2 - x) = x - 2 InstructionFoldingCase<bool>( Header() + "; CHECK: [[long:%\\w+]] = OpTypeInt 64 1\n" + "; CHECK: [[long_2:%\\w+]] = OpConstant [[long]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[long]]\n" + "; CHECK: %4 = OpISub [[long]] [[ld]] [[long_2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_long Function\n" + "%2 = OpLoad %long %var\n" + "%3 = OpISub %long %long_2 %2\n" + "%4 = OpSNegate %long %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 17: fold snegate(isub with const). // -(x - 2) = 2 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[long:%\\w+]] = OpTypeInt 64 1\n" + "; CHECK: [[long_2:%\\w+]] = OpConstant [[long]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[long]]\n" + "; CHECK: %4 = OpISub [[long]] [[long_2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_long Function\n" + "%2 = OpLoad %long %var\n" + "%3 = OpISub %long %2 %long_2\n" + "%4 = OpSNegate %long %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 18: fold -vec4(-1.0, 2.0, 1.0, 3.0) InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[v4float:%\\w+]] = OpTypeVector [[float]] 4{{[[:space:]]}}\n" + "; CHECK: [[float_n1:%\\w+]] = OpConstant [[float]] -1{{[[:space:]]}}\n" + "; CHECK: [[float_1:%\\w+]] = OpConstant [[float]] 1{{[[:space:]]}}\n" + "; CHECK: [[float_n2:%\\w+]] = OpConstant [[float]] -2{{[[:space:]]}}\n" + "; CHECK: [[float_n3:%\\w+]] = OpConstant [[float]] -3{{[[:space:]]}}\n" + "; CHECK: [[v4float_1_n2_n1_n3:%\\w+]] = OpConstantComposite [[v4float]] [[float_1]] [[float_n2]] [[float_n1]] [[float_n3]]\n" + "; CHECK: %2 = OpCopyObject [[v4float]] [[v4float_1_n2_n1_n3]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFNegate %v4float %v4float_n1_2_1_3\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 19: fold vector fnegate with null InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[v2double:%\\w+]] = OpTypeVector [[double]] 2\n" + "; CHECK: [[double_n0:%\\w+]] = OpConstant [[double]] -0\n" + "; CHECK: [[v2double_0_0:%\\w+]] = OpConstantComposite [[v2double]] [[double_n0]] [[double_n0]]\n" + "; CHECK: %2 = OpCopyObject [[v2double]] [[v2double_0_0]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpFNegate %v2double %v2double_null\n" + "OpReturn\n" + "OpFunctionEnd", 2, true) )); INSTANTIATE_TEST_SUITE_P(ReciprocalFDivTest, MatchingInstructionFoldingTest, ::testing::Values( // Test case 0: scalar reicprocal // x / 0.5 = x * 2.0 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_2:%\\w+]] = OpConstant [[float]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %3 = OpFMul [[float]] [[ld]] [[float_2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFDiv %float %2 %float_0p5\n" + "OpReturn\n" + "OpFunctionEnd\n", 3, true), // Test case 1: Unfoldable InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_0:%\\w+]] = OpConstant [[float]] 0\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %3 = OpFDiv [[float]] [[ld]] [[float_0]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFDiv %float %2 %104\n" + "OpReturn\n" + "OpFunctionEnd\n", 3, false), // Test case 2: Vector reciprocal // x / {2.0, 0.5} = x * {0.5, 2.0} InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[v2float:%\\w+]] = OpTypeVector [[float]] 2\n" + "; CHECK: [[float_2:%\\w+]] = OpConstant [[float]] 2\n" + "; CHECK: [[float_0p5:%\\w+]] = OpConstant [[float]] 0.5\n" + "; CHECK: [[v2float_0p5_2:%\\w+]] = OpConstantComposite [[v2float]] [[float_0p5]] [[float_2]]\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[v2float]]\n" + "; CHECK: %3 = OpFMul [[v2float]] [[ld]] [[v2float_0p5_2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %v2float %var\n" + "%3 = OpFDiv %v2float %2 %v2float_2_0p5\n" + "OpReturn\n" + "OpFunctionEnd\n", 3, true), // Test case 3: double reciprocal // x / 2.0 = x * 0.5 InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[double_0p5:%\\w+]] = OpConstant [[double]] 0.5\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[double]]\n" + "; CHECK: %3 = OpFMul [[double]] [[ld]] [[double_0p5]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_double Function\n" + "%2 = OpLoad %double %var\n" + "%3 = OpFDiv %double %2 %double_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 3, true), // Test case 4: don't fold x / 0. InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %v2float %var\n" + "%3 = OpFDiv %v2float %2 %v2float_null\n" + "OpReturn\n" + "OpFunctionEnd\n", 3, false) )); INSTANTIATE_TEST_SUITE_P(MergeMulTest, MatchingInstructionFoldingTest, ::testing::Values( // Test case 0: fold consecutive fmuls // (x * 3.0) * 2.0 = x * 6.0 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_6:%\\w+]] = OpConstant [[float]] 6\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFMul [[float]] [[ld]] [[float_6]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFMul %float %2 %float_3\n" + "%4 = OpFMul %float %3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 1: fold consecutive fmuls // 2.0 * (x * 3.0) = x * 6.0 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_6:%\\w+]] = OpConstant [[float]] 6\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFMul [[float]] [[ld]] [[float_6]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFMul %float %2 %float_3\n" + "%4 = OpFMul %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 2: fold consecutive fmuls // (3.0 * x) * 2.0 = x * 6.0 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_6:%\\w+]] = OpConstant [[float]] 6\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFMul [[float]] [[ld]] [[float_6]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFMul %float %float_3 %2\n" + "%4 = OpFMul %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 3: fold vector fmul InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[v2float:%\\w+]] = OpTypeVector [[float]] 2\n" + "; CHECK: [[float_6:%\\w+]] = OpConstant [[float]] 6\n" + "; CHECK: [[v2float_6_6:%\\w+]] = OpConstantComposite [[v2float]] [[float_6]] [[float_6]]\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[v2float]]\n" + "; CHECK: %4 = OpFMul [[v2float]] [[ld]] [[v2float_6_6]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %v2float %var\n" + "%3 = OpFMul %v2float %2 %v2float_2_3\n" + "%4 = OpFMul %v2float %3 %v2float_3_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 4: fold double fmuls // (x * 3.0) * 2.0 = x * 6.0 InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[double_6:%\\w+]] = OpConstant [[double]] 6\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[double]]\n" + "; CHECK: %4 = OpFMul [[double]] [[ld]] [[double_6]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_double Function\n" + "%2 = OpLoad %double %var\n" + "%3 = OpFMul %double %2 %double_3\n" + "%4 = OpFMul %double %3 %double_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 5: fold 32 bit imuls // (x * 3) * 2 = x * 6 InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[int_6:%\\w+]] = OpConstant [[int]] 6\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[int]]\n" + "; CHECK: %4 = OpIMul [[int]] [[ld]] [[int_6]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpIMul %int %2 %int_3\n" + "%4 = OpIMul %int %3 %int_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 6: fold 64 bit imuls // (x * 3) * 2 = x * 6 InstructionFoldingCase<bool>( Header() + "; CHECK: [[long:%\\w+]] = OpTypeInt 64\n" + "; CHECK: [[long_6:%\\w+]] = OpConstant [[long]] 6\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[long]]\n" + "; CHECK: %4 = OpIMul [[long]] [[ld]] [[long_6]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_long Function\n" + "%2 = OpLoad %long %var\n" + "%3 = OpIMul %long %2 %long_3\n" + "%4 = OpIMul %long %3 %long_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 7: merge vector integer mults InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[v2int:%\\w+]] = OpTypeVector [[int]] 2\n" + "; CHECK: [[int_6:%\\w+]] = OpConstant [[int]] 6\n" + "; CHECK: [[v2int_6_6:%\\w+]] = OpConstantComposite [[v2int]] [[int_6]] [[int_6]]\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[v2int]]\n" + "; CHECK: %4 = OpIMul [[v2int]] [[ld]] [[v2int_6_6]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_v2int Function\n" + "%2 = OpLoad %v2int %var\n" + "%3 = OpIMul %v2int %2 %v2int_2_3\n" + "%4 = OpIMul %v2int %3 %v2int_3_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 8: merge fmul of fdiv // 2.0 * (2.0 / x) = 4.0 / x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_4:%\\w+]] = OpConstant [[float]] 4\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFDiv [[float]] [[float_4]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFDiv %float %float_2 %2\n" + "%4 = OpFMul %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 9: merge fmul of fdiv // (2.0 / x) * 2.0 = 4.0 / x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_4:%\\w+]] = OpConstant [[float]] 4\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFDiv [[float]] [[float_4]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFDiv %float %float_2 %2\n" + "%4 = OpFMul %float %3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 10: Do not merge imul of sdiv // 4 * (x / 2) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpSDiv %int %2 %int_2\n" + "%4 = OpIMul %int %int_4 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 11: Do not merge imul of sdiv // (x / 2) * 4 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpSDiv %int %2 %int_2\n" + "%4 = OpIMul %int %3 %int_4\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 12: Do not merge imul of udiv // 4 * (x / 2) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_uint Function\n" + "%2 = OpLoad %uint %var\n" + "%3 = OpUDiv %uint %2 %uint_2\n" + "%4 = OpIMul %uint %uint_4 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 13: Do not merge imul of udiv // (x / 2) * 4 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_uint Function\n" + "%2 = OpLoad %uint %var\n" + "%3 = OpUDiv %uint %2 %uint_2\n" + "%4 = OpIMul %uint %3 %uint_4\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 14: Don't fold // (x / 3) * 4 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_uint Function\n" + "%2 = OpLoad %uint %var\n" + "%3 = OpUDiv %uint %2 %uint_3\n" + "%4 = OpIMul %uint %3 %uint_4\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 15: merge vector fmul of fdiv // (x / {2,2}) * {4,4} = x * {2,2} InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[v2float:%\\w+]] = OpTypeVector [[float]] 2\n" + "; CHECK: [[float_2:%\\w+]] = OpConstant [[float]] 2\n" + "; CHECK: [[v2float_2_2:%\\w+]] = OpConstantComposite [[v2float]] [[float_2]] [[float_2]]\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[v2float]]\n" + "; CHECK: %4 = OpFMul [[v2float]] [[ld]] [[v2float_2_2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %v2float %var\n" + "%3 = OpFDiv %v2float %2 %v2float_2_2\n" + "%4 = OpFMul %v2float %3 %v2float_4_4\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 16: merge vector imul of snegate // (-x) * {2,2} = x * {-2,-2} InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[v2int:%\\w+]] = OpTypeVector [[int]] 2{{[[:space:]]}}\n" + "; CHECK: OpConstant [[int]] -2147483648{{[[:space:]]}}\n" + "; CHECK: [[int_n2:%\\w+]] = OpConstant [[int]] -2{{[[:space:]]}}\n" + "; CHECK: [[v2int_n2_n2:%\\w+]] = OpConstantComposite [[v2int]] [[int_n2]] [[int_n2]]\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[v2int]]\n" + "; CHECK: %4 = OpIMul [[v2int]] [[ld]] [[v2int_n2_n2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_v2int Function\n" + "%2 = OpLoad %v2int %var\n" + "%3 = OpSNegate %v2int %2\n" + "%4 = OpIMul %v2int %3 %v2int_2_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 17: merge vector imul of snegate // {2,2} * (-x) = x * {-2,-2} InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[v2int:%\\w+]] = OpTypeVector [[int]] 2{{[[:space:]]}}\n" + "; CHECK: OpConstant [[int]] -2147483648{{[[:space:]]}}\n" + "; CHECK: [[int_n2:%\\w+]] = OpConstant [[int]] -2{{[[:space:]]}}\n" + "; CHECK: [[v2int_n2_n2:%\\w+]] = OpConstantComposite [[v2int]] [[int_n2]] [[int_n2]]\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[v2int]]\n" + "; CHECK: %4 = OpIMul [[v2int]] [[ld]] [[v2int_n2_n2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_v2int Function\n" + "%2 = OpLoad %v2int %var\n" + "%3 = OpSNegate %v2int %2\n" + "%4 = OpIMul %v2int %v2int_2_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 18: Fold OpVectorTimesScalar // {4,4} = OpVectorTimesScalar v2float {2,2} 2 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[v2float:%\\w+]] = OpTypeVector [[float]] 2\n" + "; CHECK: [[float_4:%\\w+]] = OpConstant [[float]] 4\n" + "; CHECK: [[v2float_4_4:%\\w+]] = OpConstantComposite [[v2float]] [[float_4]] [[float_4]]\n" + "; CHECK: %2 = OpCopyObject [[v2float]] [[v2float_4_4]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVectorTimesScalar %v2float %v2float_2_2 %float_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 19: Fold OpVectorTimesScalar // {0,0} = OpVectorTimesScalar v2float v2float_null -1 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[v2float:%\\w+]] = OpTypeVector [[float]] 2\n" + "; CHECK: [[v2float_null:%\\w+]] = OpConstantNull [[v2float]]\n" + "; CHECK: %2 = OpCopyObject [[v2float]] [[v2float_null]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVectorTimesScalar %v2float %v2float_null %float_n1\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 20: Fold OpVectorTimesScalar // {4,4} = OpVectorTimesScalar v2double {2,2} 2 InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[v2double:%\\w+]] = OpTypeVector [[double]] 2\n" + "; CHECK: [[double_4:%\\w+]] = OpConstant [[double]] 4\n" + "; CHECK: [[v2double_4_4:%\\w+]] = OpConstantComposite [[v2double]] [[double_4]] [[double_4]]\n" + "; CHECK: %2 = OpCopyObject [[v2double]] [[v2double_4_4]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVectorTimesScalar %v2double %v2double_2_2 %double_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 21: Fold OpVectorTimesScalar // {0,0} = OpVectorTimesScalar v2double {0,0} n InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[v2double:%\\w+]] = OpTypeVector [[double]] 2\n" + "; CHECK: {{%\\w+}} = OpConstant [[double]] 0\n" + "; CHECK: [[double_0:%\\w+]] = OpConstant [[double]] 0\n" + "; CHECK: [[v2double_0_0:%\\w+]] = OpConstantComposite [[v2double]] [[double_0]] [[double_0]]\n" + "; CHECK: %2 = OpCopyObject [[v2double]] [[v2double_0_0]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_double Function\n" + "%load = OpLoad %double %n\n" + "%2 = OpVectorTimesScalar %v2double %v2double_0_0 %load\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 22: Fold OpVectorTimesScalar // {0,0} = OpVectorTimesScalar v2double n 0 InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[v2double:%\\w+]] = OpTypeVector [[double]] 2\n" + "; CHECK: [[v2double_null:%\\w+]] = OpConstantNull [[v2double]]\n" + "; CHECK: %2 = OpCopyObject [[v2double]] [[v2double_null]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v2double Function\n" + "%load = OpLoad %v2double %n\n" + "%2 = OpVectorTimesScalar %v2double %load %double_0\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 23: merge fmul of fdiv // x * (y / x) = y InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[ldx:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: [[ldy:%\\w+]] = OpLoad [[float]] [[y:%\\w+]]\n" + "; CHECK: %5 = OpCopyObject [[float]] [[ldy]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%x = OpVariable %_ptr_float Function\n" + "%y = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %x\n" + "%3 = OpLoad %float %y\n" + "%4 = OpFDiv %float %3 %2\n" + "%5 = OpFMul %float %2 %4\n" + "OpReturn\n" + "OpFunctionEnd\n", 5, true), // Test case 24: merge fmul of fdiv // (y / x) * x = y InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[ldx:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: [[ldy:%\\w+]] = OpLoad [[float]] [[y:%\\w+]]\n" + "; CHECK: %5 = OpCopyObject [[float]] [[ldy]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%x = OpVariable %_ptr_float Function\n" + "%y = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %x\n" + "%3 = OpLoad %float %y\n" + "%4 = OpFDiv %float %3 %2\n" + "%5 = OpFMul %float %4 %2\n" + "OpReturn\n" + "OpFunctionEnd\n", 5, true) )); INSTANTIATE_TEST_SUITE_P(MergeDivTest, MatchingInstructionFoldingTest, ::testing::Values( // Test case 0: merge consecutive fdiv // 4.0 / (2.0 / x) = 2.0 * x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_2:%\\w+]] = OpConstant [[float]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFMul [[float]] [[float_2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFDiv %float %float_2 %2\n" + "%4 = OpFDiv %float %float_4 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 1: merge consecutive fdiv // 4.0 / (x / 2.0) = 8.0 / x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_8:%\\w+]] = OpConstant [[float]] 8\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFDiv [[float]] [[float_8]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFDiv %float %2 %float_2\n" + "%4 = OpFDiv %float %float_4 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 2: merge consecutive fdiv // (4.0 / x) / 2.0 = 2.0 / x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_2:%\\w+]] = OpConstant [[float]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFDiv [[float]] [[float_2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFDiv %float %float_4 %2\n" + "%4 = OpFDiv %float %3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 3: Do not merge consecutive sdiv // 4 / (2 / x) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpSDiv %int %int_2 %2\n" + "%4 = OpSDiv %int %int_4 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 4: Do not merge consecutive sdiv // 4 / (x / 2) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpSDiv %int %2 %int_2\n" + "%4 = OpSDiv %int %int_4 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 5: Do not merge consecutive sdiv // (4 / x) / 2 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpSDiv %int %int_4 %2\n" + "%4 = OpSDiv %int %3 %int_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 6: Do not merge consecutive sdiv // (x / 4) / 2 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpSDiv %int %2 %int_4\n" + "%4 = OpSDiv %int %3 %int_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 7: Do not merge sdiv of imul // 4 / (2 * x) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpIMul %int %int_2 %2\n" + "%4 = OpSDiv %int %int_4 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 8: Do not merge sdiv of imul // 4 / (x * 2) InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpIMul %int %2 %int_2\n" + "%4 = OpSDiv %int %int_4 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 9: Do not merge sdiv of imul // (4 * x) / 2 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpIMul %int %int_4 %2\n" + "%4 = OpSDiv %int %3 %int_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 10: Do not merge sdiv of imul // (x * 4) / 2 InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpIMul %int %2 %int_4\n" + "%4 = OpSDiv %int %3 %int_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 11: merge sdiv of snegate // (-x) / 2 = x / -2 InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: OpConstant [[int]] -2147483648\n" + "; CHECK: [[int_n2:%\\w+]] = OpConstant [[int]] -2{{[[:space:]]}}\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[int]]\n" + "; CHECK: %4 = OpSDiv [[int]] [[ld]] [[int_n2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpSNegate %int %2\n" + "%4 = OpSDiv %int %3 %int_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 12: merge sdiv of snegate // 2 / (-x) = -2 / x InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: OpConstant [[int]] -2147483648\n" + "; CHECK: [[int_n2:%\\w+]] = OpConstant [[int]] -2{{[[:space:]]}}\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[int]]\n" + "; CHECK: %4 = OpSDiv [[int]] [[int_n2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpSNegate %int %2\n" + "%4 = OpSDiv %int %int_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 13: Don't merge // (x / {null}) / {null} InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_v2float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFDiv %float %2 %v2float_null\n" + "%4 = OpFDiv %float %3 %v2float_null\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, false), // Test case 14: merge fmul of fdiv // (y * x) / x = y InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[ldx:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: [[ldy:%\\w+]] = OpLoad [[float]] [[y:%\\w+]]\n" + "; CHECK: %5 = OpCopyObject [[float]] [[ldy]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%x = OpVariable %_ptr_float Function\n" + "%y = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %x\n" + "%3 = OpLoad %float %y\n" + "%4 = OpFMul %float %3 %2\n" + "%5 = OpFDiv %float %4 %2\n" + "OpReturn\n" + "OpFunctionEnd\n", 5, true), // Test case 15: merge fmul of fdiv // (x * y) / x = y InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[ldx:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: [[ldy:%\\w+]] = OpLoad [[float]] [[y:%\\w+]]\n" + "; CHECK: %5 = OpCopyObject [[float]] [[ldy]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%x = OpVariable %_ptr_float Function\n" + "%y = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %x\n" + "%3 = OpLoad %float %y\n" + "%4 = OpFMul %float %2 %3\n" + "%5 = OpFDiv %float %4 %2\n" + "OpReturn\n" + "OpFunctionEnd\n", 5, true) )); INSTANTIATE_TEST_SUITE_P(MergeAddTest, MatchingInstructionFoldingTest, ::testing::Values( // Test case 0: merge add of negate // (-x) + 2 = 2 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_2:%\\w+]] = OpConstant [[float]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[float_2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFNegate %float %2\n" + "%4 = OpFAdd %float %3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 1: merge add of negate // 2 + (-x) = 2 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_2:%\\w+]] = OpConstant [[float]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[float_2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpSNegate %float %2\n" + "%4 = OpIAdd %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 2: merge add of negate // (-x) + 2 = 2 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[long:%\\w+]] = OpTypeInt 64 1\n" + "; CHECK: [[long_2:%\\w+]] = OpConstant [[long]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[long]]\n" + "; CHECK: %4 = OpISub [[long]] [[long_2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_long Function\n" + "%2 = OpLoad %long %var\n" + "%3 = OpSNegate %long %2\n" + "%4 = OpIAdd %long %3 %long_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 3: merge add of negate // 2 + (-x) = 2 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[long:%\\w+]] = OpTypeInt 64 1\n" + "; CHECK: [[long_2:%\\w+]] = OpConstant [[long]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[long]]\n" + "; CHECK: %4 = OpISub [[long]] [[long_2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_long Function\n" + "%2 = OpLoad %long %var\n" + "%3 = OpSNegate %long %2\n" + "%4 = OpIAdd %long %long_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 4: merge add of subtract // (x - 1) + 2 = x + 1 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_1:%\\w+]] = OpConstant [[float]] 1\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFAdd [[float]] [[ld]] [[float_1]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFSub %float %2 %float_1\n" + "%4 = OpFAdd %float %3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 5: merge add of subtract // (1 - x) + 2 = 3 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_3:%\\w+]] = OpConstant [[float]] 3\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[float_3]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFSub %float %float_1 %2\n" + "%4 = OpFAdd %float %3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 6: merge add of subtract // 2 + (x - 1) = x + 1 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_1:%\\w+]] = OpConstant [[float]] 1\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFAdd [[float]] [[ld]] [[float_1]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFSub %float %2 %float_1\n" + "%4 = OpFAdd %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 7: merge add of subtract // 2 + (1 - x) = 3 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_3:%\\w+]] = OpConstant [[float]] 3\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[float_3]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFSub %float %float_1 %2\n" + "%4 = OpFAdd %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 8: merge add of add // (x + 1) + 2 = x + 3 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_3:%\\w+]] = OpConstant [[float]] 3\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFAdd [[float]] [[ld]] [[float_3]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFAdd %float %2 %float_1\n" + "%4 = OpFAdd %float %3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 9: merge add of add // (1 + x) + 2 = 3 + x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_3:%\\w+]] = OpConstant [[float]] 3\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFAdd [[float]] [[ld]] [[float_3]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFAdd %float %float_1 %2\n" + "%4 = OpFAdd %float %3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 10: merge add of add // 2 + (x + 1) = x + 1 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_3:%\\w+]] = OpConstant [[float]] 3\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFAdd [[float]] [[ld]] [[float_3]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFAdd %float %2 %float_1\n" + "%4 = OpFAdd %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 11: merge add of add // 2 + (1 + x) = 3 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_3:%\\w+]] = OpConstant [[float]] 3\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFAdd [[float]] [[ld]] [[float_3]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFAdd %float %float_1 %2\n" + "%4 = OpFAdd %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true) )); INSTANTIATE_TEST_SUITE_P(MergeGenericAddSub, MatchingInstructionFoldingTest, ::testing::Values( // Test case 0: merge of add of sub // (a - b) + b => a InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: %6 = OpCopyObject [[float]] %3\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var0 = OpVariable %_ptr_float Function\n" + "%var1 = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %var0\n" + "%4 = OpLoad %float %var1\n" + "%5 = OpFSub %float %3 %4\n" + "%6 = OpFAdd %float %5 %4\n" + "OpReturn\n" + "OpFunctionEnd\n", 6, true), // Test case 1: merge of add of sub // b + (a - b) => a InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: %6 = OpCopyObject [[float]] %3\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var0 = OpVariable %_ptr_float Function\n" + "%var1 = OpVariable %_ptr_float Function\n" + "%3 = OpLoad %float %var0\n" + "%4 = OpLoad %float %var1\n" + "%5 = OpFSub %float %3 %4\n" + "%6 = OpFAdd %float %4 %5\n" + "OpReturn\n" + "OpFunctionEnd\n", 6, true) )); INSTANTIATE_TEST_SUITE_P(FactorAddMul, MatchingInstructionFoldingTest, ::testing::Values( // Test case 0: factor of add of muls // (a * b) + (a * c) => a * (b + c) InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[newadd:%\\w+]] = OpFAdd [[float]] %4 %5\n" + "; CHECK: %9 = OpFMul [[float]] %6 [[newadd]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var0 = OpVariable %_ptr_float Function\n" + "%var1 = OpVariable %_ptr_float Function\n" + "%var2 = OpVariable %_ptr_float Function\n" + "%4 = OpLoad %float %var0\n" + "%5 = OpLoad %float %var1\n" + "%6 = OpLoad %float %var2\n" + "%7 = OpFMul %float %6 %4\n" + "%8 = OpFMul %float %6 %5\n" + "%9 = OpFAdd %float %7 %8\n" + "OpReturn\n" + "OpFunctionEnd\n", 9, true), // Test case 1: factor of add of muls // (b * a) + (a * c) => a * (b + c) InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[newadd:%\\w+]] = OpFAdd [[float]] %4 %5\n" + "; CHECK: %9 = OpFMul [[float]] %6 [[newadd]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var0 = OpVariable %_ptr_float Function\n" + "%var1 = OpVariable %_ptr_float Function\n" + "%var2 = OpVariable %_ptr_float Function\n" + "%4 = OpLoad %float %var0\n" + "%5 = OpLoad %float %var1\n" + "%6 = OpLoad %float %var2\n" + "%7 = OpFMul %float %4 %6\n" + "%8 = OpFMul %float %6 %5\n" + "%9 = OpFAdd %float %7 %8\n" + "OpReturn\n" + "OpFunctionEnd\n", 9, true), // Test case 2: factor of add of muls // (a * b) + (c * a) => a * (b + c) InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[newadd:%\\w+]] = OpFAdd [[float]] %4 %5\n" + "; CHECK: %9 = OpFMul [[float]] %6 [[newadd]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var0 = OpVariable %_ptr_float Function\n" + "%var1 = OpVariable %_ptr_float Function\n" + "%var2 = OpVariable %_ptr_float Function\n" + "%4 = OpLoad %float %var0\n" + "%5 = OpLoad %float %var1\n" + "%6 = OpLoad %float %var2\n" + "%7 = OpFMul %float %6 %4\n" + "%8 = OpFMul %float %5 %6\n" + "%9 = OpFAdd %float %7 %8\n" + "OpReturn\n" + "OpFunctionEnd\n", 9, true), // Test case 3: factor of add of muls // (b * a) + (c * a) => a * (b + c) InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[newadd:%\\w+]] = OpFAdd [[float]] %4 %5\n" + "; CHECK: %9 = OpFMul [[float]] %6 [[newadd]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var0 = OpVariable %_ptr_float Function\n" + "%var1 = OpVariable %_ptr_float Function\n" + "%var2 = OpVariable %_ptr_float Function\n" + "%4 = OpLoad %float %var0\n" + "%5 = OpLoad %float %var1\n" + "%6 = OpLoad %float %var2\n" + "%7 = OpFMul %float %4 %6\n" + "%8 = OpFMul %float %5 %6\n" + "%9 = OpFAdd %float %7 %8\n" + "OpReturn\n" + "OpFunctionEnd\n", 9, true) )); INSTANTIATE_TEST_SUITE_P(MergeSubTest, MatchingInstructionFoldingTest, ::testing::Values( // Test case 0: merge sub of negate // (-x) - 2 = -2 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_n2:%\\w+]] = OpConstant [[float]] -2{{[[:space:]]}}\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[float_n2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFNegate %float %2\n" + "%4 = OpFSub %float %3 %float_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 1: merge sub of negate // 2 - (-x) = x + 2 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_2:%\\w+]] = OpConstant [[float]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFAdd [[float]] [[ld]] [[float_2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFNegate %float %2\n" + "%4 = OpFSub %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 2: merge sub of negate // (-x) - 2 = -2 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[long:%\\w+]] = OpTypeInt 64 1\n" + "; CHECK: [[long_n2:%\\w+]] = OpConstant [[long]] -2{{[[:space:]]}}\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[long]]\n" + "; CHECK: %4 = OpISub [[long]] [[long_n2]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_long Function\n" + "%2 = OpLoad %long %var\n" + "%3 = OpSNegate %long %2\n" + "%4 = OpISub %long %3 %long_2\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 3: merge sub of negate // 2 - (-x) = x + 2 InstructionFoldingCase<bool>( Header() + "; CHECK: [[long:%\\w+]] = OpTypeInt 64 1\n" + "; CHECK: [[long_2:%\\w+]] = OpConstant [[long]] 2\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[long]]\n" + "; CHECK: %4 = OpIAdd [[long]] [[ld]] [[long_2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_long Function\n" + "%2 = OpLoad %long %var\n" + "%3 = OpSNegate %long %2\n" + "%4 = OpISub %long %long_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 4: merge add of subtract // (x + 2) - 1 = x + 1 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_1:%\\w+]] = OpConstant [[float]] 1\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFAdd [[float]] [[ld]] [[float_1]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFAdd %float %2 %float_2\n" + "%4 = OpFSub %float %3 %float_1\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 5: merge add of subtract // (2 + x) - 1 = x + 1 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_1:%\\w+]] = OpConstant [[float]] 1\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFAdd [[float]] [[ld]] [[float_1]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFAdd %float %float_2 %2\n" + "%4 = OpFSub %float %3 %float_1\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 6: merge add of subtract // 2 - (x + 1) = 1 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_1:%\\w+]] = OpConstant [[float]] 1\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[float_1]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFAdd %float %2 %float_1\n" + "%4 = OpFSub %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 7: merge add of subtract // 2 - (1 + x) = 1 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_1:%\\w+]] = OpConstant [[float]] 1\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[float_1]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFAdd %float %float_1 %2\n" + "%4 = OpFSub %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 8: merge subtract of subtract // (x - 2) - 1 = x - 3 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_3:%\\w+]] = OpConstant [[float]] 3\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[ld]] [[float_3]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFSub %float %2 %float_2\n" + "%4 = OpFSub %float %3 %float_1\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 9: merge subtract of subtract // (2 - x) - 1 = 1 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_1:%\\w+]] = OpConstant [[float]] 1\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[float_1]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFSub %float %float_2 %2\n" + "%4 = OpFSub %float %3 %float_1\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 10: merge subtract of subtract // 2 - (x - 1) = 3 - x InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_3:%\\w+]] = OpConstant [[float]] 3\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFSub [[float]] [[float_3]] [[ld]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFSub %float %2 %float_1\n" + "%4 = OpFSub %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 11: merge subtract of subtract // 1 - (2 - x) = x + (-1) InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_n1:%\\w+]] = OpConstant [[float]] -1\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFAdd [[float]] [[ld]] [[float_n1]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFSub %float %float_2 %2\n" + "%4 = OpFSub %float %float_1 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 12: merge subtract of subtract // 2 - (1 - x) = x + 1 InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: [[float_1:%\\w+]] = OpConstant [[float]] 1\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[float]]\n" + "; CHECK: %4 = OpFAdd [[float]] [[ld]] [[float_1]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_float Function\n" + "%2 = OpLoad %float %var\n" + "%3 = OpFSub %float %float_1 %2\n" + "%4 = OpFSub %float %float_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true), // Test case 13: merge subtract of subtract with mixed types. // 2 - (1 - x) = x + 1 InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[int_1:%\\w+]] = OpConstant [[int]] 1\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[int]]\n" + "; CHECK: %4 = OpIAdd [[int]] [[ld]] [[int_1]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%var = OpVariable %_ptr_int Function\n" + "%2 = OpLoad %int %var\n" + "%3 = OpISub %int %uint_1 %2\n" + "%4 = OpISub %int %int_2 %3\n" + "OpReturn\n" + "OpFunctionEnd\n", 4, true) )); INSTANTIATE_TEST_SUITE_P(SelectFoldingTest, MatchingInstructionFoldingTest, ::testing::Values( // Test case 0: Fold select with the same values for both sides InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[int0:%\\w+]] = OpConstant [[int]] 0\n" + "; CHECK: %2 = OpCopyObject [[int]] [[int0]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_bool Function\n" + "%load = OpLoad %bool %n\n" + "%2 = OpSelect %int %load %100 %100\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 1: Fold select true to left side InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[int0:%\\w+]] = OpConstant [[int]] 0\n" + "; CHECK: %2 = OpCopyObject [[int]] [[int0]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %bool %n\n" + "%2 = OpSelect %int %true %100 %n\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 2: Fold select false to right side InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[int0:%\\w+]] = OpConstant [[int]] 0\n" + "; CHECK: %2 = OpCopyObject [[int]] [[int0]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %bool %n\n" + "%2 = OpSelect %int %false %n %100\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 3: Fold select null to right side InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[int0:%\\w+]] = OpConstant [[int]] 0\n" + "; CHECK: %2 = OpCopyObject [[int]] [[int0]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_int Function\n" + "%load = OpLoad %int %n\n" + "%2 = OpSelect %int %bool_null %load %100\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 4: vector null InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[v2int:%\\w+]] = OpTypeVector [[int]] 2\n" + "; CHECK: [[int2:%\\w+]] = OpConstant [[int]] 2\n" + "; CHECK: [[v2int2_2:%\\w+]] = OpConstantComposite [[v2int]] [[int2]] [[int2]]\n" + "; CHECK: %2 = OpCopyObject [[v2int]] [[v2int2_2]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v2int Function\n" + "%load = OpLoad %v2int %n\n" + "%2 = OpSelect %v2int %v2bool_null %load %v2int_2_2\n" + "OpReturn\n" + "OpFunctionEnd", 2, true), // Test case 5: vector select InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[v2int:%\\w+]] = OpTypeVector [[int]] 2\n" + "; CHECK: %4 = OpVectorShuffle [[v2int]] %2 %3 0 3\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%m = OpVariable %_ptr_v2int Function\n" + "%n = OpVariable %_ptr_v2int Function\n" + "%2 = OpLoad %v2int %n\n" + "%3 = OpLoad %v2int %n\n" + "%4 = OpSelect %v2int %v2bool_true_false %2 %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 6: vector select InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: [[v2int:%\\w+]] = OpTypeVector [[int]] 2\n" + "; CHECK: %4 = OpVectorShuffle [[v2int]] %2 %3 2 1\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%m = OpVariable %_ptr_v2int Function\n" + "%n = OpVariable %_ptr_v2int Function\n" + "%2 = OpLoad %v2int %n\n" + "%3 = OpLoad %v2int %n\n" + "%4 = OpSelect %v2int %v2bool_false_true %2 %3\n" + "OpReturn\n" + "OpFunctionEnd", 4, true) )); INSTANTIATE_TEST_SUITE_P(CompositeExtractMatchingTest, MatchingInstructionFoldingTest, ::testing::Values( // Test case 0: Extracting from result of consecutive shuffles of differing // size. InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: %5 = OpCompositeExtract [[int]] %2 2\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4int Function\n" + "%2 = OpLoad %v4int %n\n" + "%3 = OpVectorShuffle %v2int %2 %2 2 3\n" + "%4 = OpVectorShuffle %v4int %2 %3 0 4 2 5\n" + "%5 = OpCompositeExtract %int %4 1\n" + "OpReturn\n" + "OpFunctionEnd", 5, true), // Test case 1: Extracting from result of vector shuffle of differing // input and result sizes. InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: %4 = OpCompositeExtract [[int]] %2 2\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4int Function\n" + "%2 = OpLoad %v4int %n\n" + "%3 = OpVectorShuffle %v2int %2 %2 2 3\n" + "%4 = OpCompositeExtract %int %3 0\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 2: Extracting from result of vector shuffle of differing // input and result sizes. InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: %4 = OpCompositeExtract [[int]] %2 3\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4int Function\n" + "%2 = OpLoad %v4int %n\n" + "%3 = OpVectorShuffle %v2int %2 %2 2 3\n" + "%4 = OpCompositeExtract %int %3 1\n" + "OpReturn\n" + "OpFunctionEnd", 4, true), // Test case 3: Using fmix feeding extract with a 1 in the a position. InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[v4double:%\\w+]] = OpTypeVector [[double]] 4\n" + "; CHECK: [[ptr_v4double:%\\w+]] = OpTypePointer Function [[v4double]]\n" + "; CHECK: [[m:%\\w+]] = OpVariable [[ptr_v4double]] Function\n" + "; CHECK: [[n:%\\w+]] = OpVariable [[ptr_v4double]] Function\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[v4double]] [[n]]\n" + "; CHECK: %5 = OpCompositeExtract [[double]] [[ld]] 1\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%m = OpVariable %_ptr_v4double Function\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%2 = OpLoad %v4double %m\n" + "%3 = OpLoad %v4double %n\n" + "%4 = OpExtInst %v4double %1 FMix %2 %3 %v4double_0_1_0_0\n" + "%5 = OpCompositeExtract %double %4 1\n" + "OpReturn\n" + "OpFunctionEnd", 5, true), // Test case 4: Using fmix feeding extract with a 0 in the a position. InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[v4double:%\\w+]] = OpTypeVector [[double]] 4\n" + "; CHECK: [[ptr_v4double:%\\w+]] = OpTypePointer Function [[v4double]]\n" + "; CHECK: [[m:%\\w+]] = OpVariable [[ptr_v4double]] Function\n" + "; CHECK: [[n:%\\w+]] = OpVariable [[ptr_v4double]] Function\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[v4double]] [[m]]\n" + "; CHECK: %5 = OpCompositeExtract [[double]] [[ld]] 2\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%m = OpVariable %_ptr_v4double Function\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%2 = OpLoad %v4double %m\n" + "%3 = OpLoad %v4double %n\n" + "%4 = OpExtInst %v4double %1 FMix %2 %3 %v4double_0_1_0_0\n" + "%5 = OpCompositeExtract %double %4 2\n" + "OpReturn\n" + "OpFunctionEnd", 5, true), // Test case 5: Using fmix feeding extract with a null for the alpha InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[v4double:%\\w+]] = OpTypeVector [[double]] 4\n" + "; CHECK: [[ptr_v4double:%\\w+]] = OpTypePointer Function [[v4double]]\n" + "; CHECK: [[m:%\\w+]] = OpVariable [[ptr_v4double]] Function\n" + "; CHECK: [[n:%\\w+]] = OpVariable [[ptr_v4double]] Function\n" + "; CHECK: [[ld:%\\w+]] = OpLoad [[v4double]] [[m]]\n" + "; CHECK: %5 = OpCompositeExtract [[double]] [[ld]] 0\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%m = OpVariable %_ptr_v4double Function\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%2 = OpLoad %v4double %m\n" + "%3 = OpLoad %v4double %n\n" + "%4 = OpExtInst %v4double %1 FMix %2 %3 %v4double_null\n" + "%5 = OpCompositeExtract %double %4 0\n" + "OpReturn\n" + "OpFunctionEnd", 5, true), // Test case 6: Don't fold: Using fmix feeding extract with 0.5 in the a // position. InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%m = OpVariable %_ptr_v4double Function\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%2 = OpLoad %v4double %m\n" + "%3 = OpLoad %v4double %n\n" + "%4 = OpExtInst %v4double %1 FMix %2 %3 %v4double_1_1_1_0p5\n" + "%5 = OpCompositeExtract %double %4 3\n" + "OpReturn\n" + "OpFunctionEnd", 5, false), // Test case 7: Extracting the undefined literal value from a vector // shuffle. InstructionFoldingCase<bool>( Header() + "; CHECK: [[int:%\\w+]] = OpTypeInt 32 1\n" + "; CHECK: %4 = OpUndef [[int]]\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4int Function\n" + "%2 = OpLoad %v4int %n\n" + "%3 = OpVectorShuffle %v2int %2 %2 2 4294967295\n" + "%4 = OpCompositeExtract %int %3 1\n" + "OpReturn\n" + "OpFunctionEnd", 4, true) )); INSTANTIATE_TEST_SUITE_P(DotProductMatchingTest, MatchingInstructionFoldingTest, ::testing::Values( // Test case 0: Using OpDot to extract last element. InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: %3 = OpCompositeExtract [[float]] %2 3\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4float Function\n" + "%2 = OpLoad %v4float %n\n" + "%3 = OpDot %float %2 %v4float_0_0_0_1\n" + "OpReturn\n" + "OpFunctionEnd", 3, true), // Test case 1: Using OpDot to extract last element. InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: %3 = OpCompositeExtract [[float]] %2 3\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4float Function\n" + "%2 = OpLoad %v4float %n\n" + "%3 = OpDot %float %v4float_0_0_0_1 %2\n" + "OpReturn\n" + "OpFunctionEnd", 3, true), // Test case 2: Using OpDot to extract second element. InstructionFoldingCase<bool>( Header() + "; CHECK: [[float:%\\w+]] = OpTypeFloat 32\n" + "; CHECK: %3 = OpCompositeExtract [[float]] %2 1\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4float Function\n" + "%2 = OpLoad %v4float %n\n" + "%3 = OpDot %float %v4float_0_1_0_0 %2\n" + "OpReturn\n" + "OpFunctionEnd", 3, true), // Test case 3: Using OpDot to extract last element. InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: %3 = OpCompositeExtract [[double]] %2 3\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%2 = OpLoad %v4double %n\n" + "%3 = OpDot %double %2 %v4double_0_0_0_1\n" + "OpReturn\n" + "OpFunctionEnd", 3, true), // Test case 4: Using OpDot to extract last element. InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: %3 = OpCompositeExtract [[double]] %2 3\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%2 = OpLoad %v4double %n\n" + "%3 = OpDot %double %v4double_0_0_0_1 %2\n" + "OpReturn\n" + "OpFunctionEnd", 3, true), // Test case 5: Using OpDot to extract second element. InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: %3 = OpCompositeExtract [[double]] %2 1\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%2 = OpLoad %v4double %n\n" + "%3 = OpDot %double %v4double_0_1_0_0 %2\n" + "OpReturn\n" + "OpFunctionEnd", 3, true) )); using MatchingInstructionWithNoResultFoldingTest = ::testing::TestWithParam<InstructionFoldingCase<bool>>; // Test folding instructions that do not have a result. The instruction // that will be folded is the last instruction before the return. If there // are multiple returns, there is not guarentee which one is used. TEST_P(MatchingInstructionWithNoResultFoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. Instruction* inst = nullptr; Function* func = &*context->module()->begin(); for (auto& bb : *func) { Instruction* terminator = bb.terminator(); if (terminator->IsReturnOrAbort()) { inst = terminator->PreviousNode(); break; } } assert(inst && "Invalid test. Could not find instruction to fold."); std::unique_ptr<Instruction> original_inst(inst->Clone(context.get())); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); EXPECT_EQ(succeeded, tc.expected_result); if (succeeded) { Match(tc.test_body, context.get()); } } INSTANTIATE_TEST_SUITE_P(StoreMatchingTest, MatchingInstructionWithNoResultFoldingTest, ::testing::Values( // Test case 0: Remove store of undef. InstructionFoldingCase<bool>( Header() + "; CHECK: OpLabel\n" + "; CHECK-NOT: OpStore\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%undef = OpUndef %v4double\n" + "OpStore %n %undef\n" + "OpReturn\n" + "OpFunctionEnd", 0 /* OpStore */, true), // Test case 1: Keep volatile store. InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%n = OpVariable %_ptr_v4double Function\n" + "%undef = OpUndef %v4double\n" + "OpStore %n %undef Volatile\n" + "OpReturn\n" + "OpFunctionEnd", 0 /* OpStore */, false) )); INSTANTIATE_TEST_SUITE_P(VectorShuffleMatchingTest, MatchingInstructionWithNoResultFoldingTest, ::testing::Values( // Test case 0: Basic test 1 InstructionFoldingCase<bool>( Header() + "; CHECK: OpVectorShuffle\n" + "; CHECK: OpVectorShuffle {{%\\w+}} %7 %5 2 3 6 7\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v4double %5 %6 2 3 4 5\n" + "%9 = OpVectorShuffle %v4double %7 %8 2 3 4 5\n" + "OpReturn\n" + "OpFunctionEnd", 9, true), // Test case 1: Basic test 2 InstructionFoldingCase<bool>( Header() + "; CHECK: OpVectorShuffle\n" + "; CHECK: OpVectorShuffle {{%\\w+}} %6 %7 0 1 4 5\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v4double %5 %6 2 3 4 5\n" + "%9 = OpVectorShuffle %v4double %8 %7 2 3 4 5\n" + "OpReturn\n" + "OpFunctionEnd", 9, true), // Test case 2: Basic test 3 InstructionFoldingCase<bool>( Header() + "; CHECK: OpVectorShuffle\n" + "; CHECK: OpVectorShuffle {{%\\w+}} %5 %7 3 2 4 5\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v4double %5 %6 2 3 4 5\n" + "%9 = OpVectorShuffle %v4double %8 %7 1 0 4 5\n" + "OpReturn\n" + "OpFunctionEnd", 9, true), // Test case 3: Basic test 4 InstructionFoldingCase<bool>( Header() + "; CHECK: OpVectorShuffle\n" + "; CHECK: OpVectorShuffle {{%\\w+}} %7 %6 2 3 5 4\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v4double %5 %6 2 3 4 5\n" + "%9 = OpVectorShuffle %v4double %7 %8 2 3 7 6\n" + "OpReturn\n" + "OpFunctionEnd", 9, true), // Test case 4: Don't fold, need both operands of the feeder. InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v4double %5 %6 2 3 4 5\n" + "%9 = OpVectorShuffle %v4double %7 %8 2 3 7 5\n" + "OpReturn\n" + "OpFunctionEnd", 9, false), // Test case 5: Don't fold, need both operands of the feeder. InstructionFoldingCase<bool>( Header() + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v4double %5 %6 2 3 4 5\n" + "%9 = OpVectorShuffle %v4double %8 %7 2 0 7 5\n" + "OpReturn\n" + "OpFunctionEnd", 9, false), // Test case 6: Fold, need both operands of the feeder, but they are the same. InstructionFoldingCase<bool>( Header() + "; CHECK: OpVectorShuffle\n" + "; CHECK: OpVectorShuffle {{%\\w+}} %5 %7 0 2 7 5\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v4double %5 %5 2 3 4 5\n" + "%9 = OpVectorShuffle %v4double %8 %7 2 0 7 5\n" + "OpReturn\n" + "OpFunctionEnd", 9, true), // Test case 7: Fold, need both operands of the feeder, but they are the same. InstructionFoldingCase<bool>( Header() + "; CHECK: OpVectorShuffle\n" + "; CHECK: OpVectorShuffle {{%\\w+}} %7 %5 2 0 5 7\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v4double %5 %5 2 3 4 5\n" + "%9 = OpVectorShuffle %v4double %7 %8 2 0 7 5\n" + "OpReturn\n" + "OpFunctionEnd", 9, true), // Test case 8: Replace first operand with a smaller vector. InstructionFoldingCase<bool>( Header() + "; CHECK: OpVectorShuffle\n" + "; CHECK: OpVectorShuffle {{%\\w+}} %5 %7 0 0 5 3\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v2double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v2double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v4double %5 %5 0 1 2 3\n" + "%9 = OpVectorShuffle %v4double %8 %7 2 0 7 5\n" + "OpReturn\n" + "OpFunctionEnd", 9, true), // Test case 9: Replace first operand with a larger vector. InstructionFoldingCase<bool>( Header() + "; CHECK: OpVectorShuffle\n" + "; CHECK: OpVectorShuffle {{%\\w+}} %5 %7 3 0 7 5\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v2double %5 %5 0 3\n" + "%9 = OpVectorShuffle %v4double %8 %7 1 0 5 3\n" + "OpReturn\n" + "OpFunctionEnd", 9, true), // Test case 10: Replace unused operand with null. InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[v4double:%\\w+]] = OpTypeVector [[double]] 2\n" + "; CHECK: [[null:%\\w+]] = OpConstantNull [[v4double]]\n" + "; CHECK: OpVectorShuffle\n" + "; CHECK: OpVectorShuffle {{%\\w+}} [[null]] %7 4 2 5 3\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v2double %5 %5 0 3\n" + "%9 = OpVectorShuffle %v4double %8 %7 4 2 5 3\n" + "OpReturn\n" + "OpFunctionEnd", 9, true), // Test case 11: Replace unused operand with null. InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[v4double:%\\w+]] = OpTypeVector [[double]] 2\n" + "; CHECK: [[null:%\\w+]] = OpConstantNull [[v4double]]\n" + "; CHECK: OpVectorShuffle\n" + "; CHECK: OpVectorShuffle {{%\\w+}} [[null]] %5 2 2 5 5\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%8 = OpVectorShuffle %v2double %5 %5 0 3\n" + "%9 = OpVectorShuffle %v4double %8 %8 2 2 3 3\n" + "OpReturn\n" + "OpFunctionEnd", 9, true), // Test case 12: Replace unused operand with null. InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[v4double:%\\w+]] = OpTypeVector [[double]] 2\n" + "; CHECK: [[null:%\\w+]] = OpConstantNull [[v4double]]\n" + "; CHECK: OpVectorShuffle\n" + "; CHECK: OpVectorShuffle {{%\\w+}} %7 [[null]] 2 0 1 3\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v2double %5 %5 0 3\n" + "%9 = OpVectorShuffle %v4double %7 %8 2 0 1 3\n" + "OpReturn\n" + "OpFunctionEnd", 9, true), // Test case 13: Shuffle with undef literal. InstructionFoldingCase<bool>( Header() + "; CHECK: [[double:%\\w+]] = OpTypeFloat 64\n" + "; CHECK: [[v4double:%\\w+]] = OpTypeVector [[double]] 2\n" + "; CHECK: OpVectorShuffle\n" + "; CHECK: OpVectorShuffle {{%\\w+}} %7 {{%\\w+}} 2 0 1 4294967295\n" + "; CHECK: OpReturn\n" + "%main = OpFunction %void None %void_func\n" + "%main_lab = OpLabel\n" + "%2 = OpVariable %_ptr_v4double Function\n" + "%3 = OpVariable %_ptr_v4double Function\n" + "%4 = OpVariable %_ptr_v4double Function\n" + "%5 = OpLoad %v4double %2\n" + "%6 = OpLoad %v4double %3\n" + "%7 = OpLoad %v4double %4\n" + "%8 = OpVectorShuffle %v2double %5 %5 0 1\n" + "%9 = OpVectorShuffle %v4double %7 %8 2 0 1 4294967295\n" + "OpReturn\n" + "OpFunctionEnd", 9, true) )); using EntryPointFoldingTest = ::testing::TestWithParam<InstructionFoldingCase<bool>>; TEST_P(EntryPointFoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_1, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. Instruction* inst = nullptr; inst = &*context->module()->entry_points().begin(); assert(inst && "Invalid test. Could not find entry point instruction to fold."); std::unique_ptr<Instruction> original_inst(inst->Clone(context.get())); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); EXPECT_EQ(succeeded, tc.expected_result); if (succeeded) { Match(tc.test_body, context.get()); } } INSTANTIATE_TEST_SUITE_P(OpEntryPointFoldingTest, EntryPointFoldingTest, ::testing::Values( // Test case 0: Basic test 1 InstructionFoldingCase<bool>(std::string() + "; CHECK: OpEntryPoint Fragment %2 \"main\" %3\n" + "OpCapability Shader\n" + "%1 = OpExtInstImport \"GLSL.std.450\"\n" + "OpMemoryModel Logical GLSL450\n" + "OpEntryPoint Fragment %2 \"main\" %3 %3 %3\n" + "OpExecutionMode %2 OriginUpperLeft\n" + "OpSource GLSL 430\n" + "OpDecorate %3 Location 0\n" + "%void = OpTypeVoid\n" + "%5 = OpTypeFunction %void\n" + "%float = OpTypeFloat 32\n" + "%v4float = OpTypeVector %float 4\n" + "%_ptr_Output_v4float = OpTypePointer Output %v4float\n" + "%3 = OpVariable %_ptr_Output_v4float Output\n" + "%int = OpTypeInt 32 1\n" + "%int_0 = OpConstant %int 0\n" + "%_ptr_PushConstant_v4float = OpTypePointer PushConstant %v4float\n" + "%2 = OpFunction %void None %5\n" + "%12 = OpLabel\n" + "OpReturn\n" + "OpFunctionEnd\n", 9, true), InstructionFoldingCase<bool>(std::string() + "; CHECK: OpEntryPoint Fragment %2 \"main\" %3 %4\n" + "OpCapability Shader\n" + "%1 = OpExtInstImport \"GLSL.std.450\"\n" + "OpMemoryModel Logical GLSL450\n" + "OpEntryPoint Fragment %2 \"main\" %3 %4 %3\n" + "OpExecutionMode %2 OriginUpperLeft\n" + "OpSource GLSL 430\n" + "OpDecorate %3 Location 0\n" + "%void = OpTypeVoid\n" + "%5 = OpTypeFunction %void\n" + "%float = OpTypeFloat 32\n" + "%v4float = OpTypeVector %float 4\n" + "%_ptr_Output_v4float = OpTypePointer Output %v4float\n" + "%3 = OpVariable %_ptr_Output_v4float Output\n" + "%4 = OpVariable %_ptr_Output_v4float Output\n" + "%int = OpTypeInt 32 1\n" + "%int_0 = OpConstant %int 0\n" + "%_ptr_PushConstant_v4float = OpTypePointer PushConstant %v4float\n" + "%2 = OpFunction %void None %5\n" + "%12 = OpLabel\n" + "OpReturn\n" + "OpFunctionEnd\n", 9, true), InstructionFoldingCase<bool>(std::string() + "; CHECK: OpEntryPoint Fragment %2 \"main\" %4 %3\n" + "OpCapability Shader\n" + "%1 = OpExtInstImport \"GLSL.std.450\"\n" + "OpMemoryModel Logical GLSL450\n" + "OpEntryPoint Fragment %2 \"main\" %4 %4 %3\n" + "OpExecutionMode %2 OriginUpperLeft\n" + "OpSource GLSL 430\n" + "OpDecorate %3 Location 0\n" + "%void = OpTypeVoid\n" + "%5 = OpTypeFunction %void\n" + "%float = OpTypeFloat 32\n" + "%v4float = OpTypeVector %float 4\n" + "%_ptr_Output_v4float = OpTypePointer Output %v4float\n" + "%3 = OpVariable %_ptr_Output_v4float Output\n" + "%4 = OpVariable %_ptr_Output_v4float Output\n" + "%int = OpTypeInt 32 1\n" + "%int_0 = OpConstant %int 0\n" + "%_ptr_PushConstant_v4float = OpTypePointer PushConstant %v4float\n" + "%2 = OpFunction %void None %5\n" + "%12 = OpLabel\n" + "OpReturn\n" + "OpFunctionEnd\n", 9, true) )); using SPV14FoldingTest = ::testing::TestWithParam<InstructionFoldingCase<bool>>; TEST_P(SPV14FoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_4, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); std::unique_ptr<Instruction> original_inst(inst->Clone(context.get())); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); EXPECT_EQ(succeeded, tc.expected_result); if (succeeded) { Match(tc.test_body, context.get()); } } INSTANTIATE_TEST_SUITE_P(SPV14FoldingTest, SPV14FoldingTest, ::testing::Values( // Test case 0: select vectors with scalar condition. InstructionFoldingCase<bool>(std::string() + "; CHECK-NOT: OpSelect\n" + "; CHECK: %3 = OpCopyObject {{%\\w+}} %1\n" + "OpCapability Shader\n" + "OpCapability Linkage\n" + "%void = OpTypeVoid\n" + "%bool = OpTypeBool\n" + "%true = OpConstantTrue %bool\n" + "%int = OpTypeInt 32 0\n" + "%int4 = OpTypeVector %int 4\n" + "%int_0 = OpConstant %int 0\n" + "%int_1 = OpConstant %int 1\n" + "%1 = OpUndef %int4\n" + "%2 = OpUndef %int4\n" + "%void_fn = OpTypeFunction %void\n" + "%func = OpFunction %void None %void_fn\n" + "%entry = OpLabel\n" + "%3 = OpSelect %int4 %true %1 %2\n" + "OpReturn\n" + "OpFunctionEnd\n" , 3, true), // Test case 1: select struct with scalar condition. InstructionFoldingCase<bool>(std::string() + "; CHECK-NOT: OpSelect\n" + "; CHECK: %3 = OpCopyObject {{%\\w+}} %2\n" + "OpCapability Shader\n" + "OpCapability Linkage\n" + "%void = OpTypeVoid\n" + "%bool = OpTypeBool\n" + "%true = OpConstantFalse %bool\n" + "%int = OpTypeInt 32 0\n" + "%struct = OpTypeStruct %int %int %int %int\n" + "%int_0 = OpConstant %int 0\n" + "%int_1 = OpConstant %int 1\n" + "%1 = OpUndef %struct\n" + "%2 = OpUndef %struct\n" + "%void_fn = OpTypeFunction %void\n" + "%func = OpFunction %void None %void_fn\n" + "%entry = OpLabel\n" + "%3 = OpSelect %struct %true %1 %2\n" + "OpReturn\n" + "OpFunctionEnd\n" , 3, true), // Test case 1: select array with scalar condition. InstructionFoldingCase<bool>(std::string() + "; CHECK-NOT: OpSelect\n" + "; CHECK: %3 = OpCopyObject {{%\\w+}} %2\n" + "OpCapability Shader\n" + "OpCapability Linkage\n" + "%void = OpTypeVoid\n" + "%bool = OpTypeBool\n" + "%true = OpConstantFalse %bool\n" + "%int = OpTypeInt 32 0\n" + "%int_0 = OpConstant %int 0\n" + "%int_1 = OpConstant %int 1\n" + "%int_4 = OpConstant %int 4\n" + "%array = OpTypeStruct %int %int %int %int\n" + "%1 = OpUndef %array\n" + "%2 = OpUndef %array\n" + "%void_fn = OpTypeFunction %void\n" + "%func = OpFunction %void None %void_fn\n" + "%entry = OpLabel\n" + "%3 = OpSelect %array %true %1 %2\n" + "OpReturn\n" + "OpFunctionEnd\n" , 3, true) )); std::string FloatControlsHeader(const std::string& capabilities) { std::string header = R"( OpCapability Shader )" + capabilities + R"( %void = OpTypeVoid %float = OpTypeFloat 32 %float_0 = OpConstant %float 0 %float_1 = OpConstant %float 1 %void_fn = OpTypeFunction %void %func = OpFunction %void None %void_fn %entry = OpLabel )"; return header; } using FloatControlsFoldingTest = ::testing::TestWithParam<InstructionFoldingCase<bool>>; TEST_P(FloatControlsFoldingTest, Case) { const auto& tc = GetParam(); // Build module. std::unique_ptr<IRContext> context = BuildModule(SPV_ENV_UNIVERSAL_1_4, nullptr, tc.test_body, SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS); ASSERT_NE(nullptr, context); // Fold the instruction to test. analysis::DefUseManager* def_use_mgr = context->get_def_use_mgr(); Instruction* inst = def_use_mgr->GetDef(tc.id_to_fold); std::unique_ptr<Instruction> original_inst(inst->Clone(context.get())); bool succeeded = context->get_instruction_folder().FoldInstruction(inst); EXPECT_EQ(succeeded, tc.expected_result); if (succeeded) { Match(tc.test_body, context.get()); } } INSTANTIATE_TEST_SUITE_P(FloatControlsFoldingTest, FloatControlsFoldingTest, ::testing::Values( // Test case 0: no folding with DenormPreserve InstructionFoldingCase<bool>(FloatControlsHeader("OpCapability DenormPreserve") + "%1 = OpFAdd %float %float_0 %float_1\n" + "OpReturn\n" + "OpFunctionEnd\n" , 1, false), // Test case 1: no folding with DenormFlushToZero InstructionFoldingCase<bool>(FloatControlsHeader("OpCapability DenormFlushToZero") + "%1 = OpFAdd %float %float_0 %float_1\n" + "OpReturn\n" + "OpFunctionEnd\n" , 1, false), // Test case 2: no folding with SignedZeroInfNanPreserve InstructionFoldingCase<bool>(FloatControlsHeader("OpCapability SignedZeroInfNanPreserve") + "%1 = OpFAdd %float %float_0 %float_1\n" + "OpReturn\n" + "OpFunctionEnd\n" , 1, false), // Test case 3: no folding with RoundingModeRTE InstructionFoldingCase<bool>(FloatControlsHeader("OpCapability RoundingModeRTE") + "%1 = OpFAdd %float %float_0 %float_1\n" + "OpReturn\n" + "OpFunctionEnd\n" , 1, false), // Test case 4: no folding with RoundingModeRTZ InstructionFoldingCase<bool>(FloatControlsHeader("OpCapability RoundingModeRTZ") + "%1 = OpFAdd %float %float_0 %float_1\n" + "OpReturn\n" + "OpFunctionEnd\n" , 1, false) )); std::string ImageOperandsTestBody(const std::string& image_instruction) { std::string body = R"( OpCapability Shader OpCapability ImageGatherExtended OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %main "main" OpExecutionMode %main OriginUpperLeft OpDecorate %Texture DescriptorSet 0 OpDecorate %Texture Binding 0 %int = OpTypeInt 32 1 %int_n1 = OpConstant %int -1 %5 = OpConstant %int 0 %float = OpTypeFloat 32 %float_0 = OpConstant %float 0 %type_2d_image = OpTypeImage %float 2D 2 0 0 1 Unknown %type_sampled_image = OpTypeSampledImage %type_2d_image %type_sampler = OpTypeSampler %_ptr_UniformConstant_type_sampler = OpTypePointer UniformConstant %type_sampler %_ptr_UniformConstant_type_2d_image = OpTypePointer UniformConstant %type_2d_image %_ptr_int = OpTypePointer Function %int %v2int = OpTypeVector %int 2 %10 = OpTypeVector %float 4 %void = OpTypeVoid %22 = OpTypeFunction %void %v2float = OpTypeVector %float 2 %v3int = OpTypeVector %int 3 %Texture = OpVariable %_ptr_UniformConstant_type_2d_image UniformConstant %gSampler = OpVariable %_ptr_UniformConstant_type_sampler UniformConstant %101 = OpConstantComposite %v2int %int_n1 %int_n1 %20 = OpConstantComposite %v2float %float_0 %float_0 %main = OpFunction %void None %22 %23 = OpLabel %var = OpVariable %_ptr_int Function %88 = OpLoad %type_2d_image %Texture %val = OpLoad %int %var %sampler = OpLoad %type_sampler %gSampler %26 = OpSampledImage %type_sampled_image %88 %sampler )" + image_instruction + R"( OpReturn OpFunctionEnd )"; return body; } INSTANTIATE_TEST_SUITE_P(ImageOperandsBitmaskFoldingTest, MatchingInstructionWithNoResultFoldingTest, ::testing::Values( // Test case 0: OpImageFetch without Offset InstructionFoldingCase<bool>(ImageOperandsTestBody( "%89 = OpImageFetch %10 %88 %101 Lod %5 \n") , 89, false), // Test case 1: OpImageFetch with non-const offset InstructionFoldingCase<bool>(ImageOperandsTestBody( "%89 = OpImageFetch %10 %88 %101 Lod|Offset %5 %val \n") , 89, false), // Test case 2: OpImageFetch with Lod and Offset InstructionFoldingCase<bool>(ImageOperandsTestBody( " %89 = OpImageFetch %10 %88 %101 Lod|Offset %5 %101 \n" "; CHECK: %89 = OpImageFetch %10 %88 %101 Lod|ConstOffset %5 %101 \n") , 89, true), // Test case 3: OpImageFetch with Bias and Offset InstructionFoldingCase<bool>(ImageOperandsTestBody( " %89 = OpImageFetch %10 %88 %101 Bias|Offset %5 %101 \n" "; CHECK: %89 = OpImageFetch %10 %88 %101 Bias|ConstOffset %5 %101 \n") , 89, true), // Test case 4: OpImageFetch with Grad and Offset. // Grad adds 2 operands to the instruction. InstructionFoldingCase<bool>(ImageOperandsTestBody( " %89 = OpImageFetch %10 %88 %101 Grad|Offset %5 %5 %101 \n" "; CHECK: %89 = OpImageFetch %10 %88 %101 Grad|ConstOffset %5 %5 %101 \n") , 89, true), // Test case 5: OpImageFetch with Offset and MinLod. // This is an example of a case where the bitmask bit-offset is larger than // that of the Offset. InstructionFoldingCase<bool>(ImageOperandsTestBody( " %89 = OpImageFetch %10 %88 %101 Offset|MinLod %101 %5 \n" "; CHECK: %89 = OpImageFetch %10 %88 %101 ConstOffset|MinLod %101 %5 \n") , 89, true), // Test case 6: OpImageGather with constant Offset InstructionFoldingCase<bool>(ImageOperandsTestBody( " %89 = OpImageGather %10 %26 %20 %5 Offset %101 \n" "; CHECK: %89 = OpImageGather %10 %26 %20 %5 ConstOffset %101 \n") , 89, true), // Test case 7: OpImageWrite with constant Offset InstructionFoldingCase<bool>(ImageOperandsTestBody( " OpImageWrite %88 %5 %101 Offset %101 \n" "; CHECK: OpImageWrite %88 %5 %101 ConstOffset %101 \n") , 0 /* No result-id */, true) )); } // namespace } // namespace opt } // namespace spvtools
Java
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! #include "config.h" #include "V8TestSpecialOperations.h" #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/UnionTypesCore.h" #include "bindings/core/v8/V8DOMConfiguration.h" #include "bindings/core/v8/V8HiddenValue.h" #include "bindings/core/v8/V8Node.h" #include "bindings/core/v8/V8NodeList.h" #include "bindings/core/v8/V8ObjectConstructor.h" #include "core/dom/ContextFeatures.h" #include "core/dom/Document.h" #include "core/dom/NameNodeList.h" #include "core/dom/NodeList.h" #include "core/dom/StaticNodeList.h" #include "core/html/LabelsNodeList.h" #include "platform/RuntimeEnabledFeatures.h" #include "platform/TraceEvent.h" #include "wtf/GetPtr.h" #include "wtf/RefPtr.h" namespace blink { const WrapperTypeInfo V8TestSpecialOperations::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestSpecialOperations::domTemplate, V8TestSpecialOperations::refObject, V8TestSpecialOperations::derefObject, V8TestSpecialOperations::trace, 0, 0, 0, V8TestSpecialOperations::installConditionallyEnabledMethods, V8TestSpecialOperations::installConditionallyEnabledProperties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Independent, WrapperTypeInfo::RefCountedObject }; // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestSpecialOperations.h. // For details, see the comment of DEFINE_WRAPPERTYPEINFO in // bindings/core/v8/ScriptWrappable.h. const WrapperTypeInfo& TestSpecialOperations::s_wrapperTypeInfo = V8TestSpecialOperations::wrapperTypeInfo; namespace TestSpecialOperationsV8Internal { static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { if (UNLIKELY(info.Length() < 1)) { V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "namedItem", "TestSpecialOperations", 1, info.Length()), info.GetIsolate()); return; } TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder()); V8StringResource<> name; { TOSTRING_VOID_INTERNAL(name, info[0]); } NodeOrNodeList result; impl->getItem(name, result); v8SetReturnValue(info, result); } static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); TestSpecialOperationsV8Internal::namedItemMethod(info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) { TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder()); AtomicString propertyName = toCoreAtomicString(name); NodeOrNodeList result; impl->getItem(propertyName, result); if (result.isNull()) return; v8SetReturnValue(info, result); } static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); TestSpecialOperationsV8Internal::namedPropertyGetter(name, info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) { TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder()); TOSTRING_VOID(V8StringResource<>, propertyName, name); Node* propertyValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); bool result = impl->anonymousNamedSetter(propertyName, propertyValue); if (!result) return; v8SetReturnValue(info, v8Value); } static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); TestSpecialOperationsV8Internal::namedPropertySetter(name, v8Value, info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info) { TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder()); AtomicString propertyName = toCoreAtomicString(name); v8::String::Utf8Value namedProperty(name); ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestSpecialOperations", info.Holder(), info.GetIsolate()); bool result = impl->namedPropertyQuery(propertyName, exceptionState); if (exceptionState.throwIfNeeded()) return; if (!result) return; v8SetReturnValueInt(info, v8::None); } static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); TestSpecialOperationsV8Internal::namedPropertyQuery(name, info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info) { TestSpecialOperations* impl = V8TestSpecialOperations::toImpl(info.Holder()); Vector<String> names; ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestSpecialOperations", info.Holder(), info.GetIsolate()); impl->namedPropertyEnumerator(names, exceptionState); if (exceptionState.throwIfNeeded()) return; v8::Handle<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size()); for (size_t i = 0; i < names.size(); ++i) v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIsolate(), names[i])); v8SetReturnValue(info, v8names); } static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info) { TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); TestSpecialOperationsV8Internal::namedPropertyEnumerator(info); TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); } } // namespace TestSpecialOperationsV8Internal static const V8DOMConfiguration::MethodConfiguration V8TestSpecialOperationsMethods[] = { {"namedItem", TestSpecialOperationsV8Internal::namedItemMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, }; static void installV8TestSpecialOperationsTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate) { functionTemplate->ReadOnlyPrototype(); v8::Local<v8::Signature> defaultSignature; defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestSpecialOperations", v8::Local<v8::FunctionTemplate>(), V8TestSpecialOperations::internalFieldCount, 0, 0, 0, 0, V8TestSpecialOperationsMethods, WTF_ARRAY_LENGTH(V8TestSpecialOperationsMethods), isolate); v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceTemplate(); ALLOW_UNUSED_LOCAL(instanceTemplate); v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->PrototypeTemplate(); ALLOW_UNUSED_LOCAL(prototypeTemplate); functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestSpecialOperationsV8Internal::namedPropertyGetterCallback, TestSpecialOperationsV8Internal::namedPropertySetterCallback, TestSpecialOperationsV8Internal::namedPropertyQueryCallback, 0, TestSpecialOperationsV8Internal::namedPropertyEnumeratorCallback); // Custom toString template functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate()); } v8::Handle<v8::FunctionTemplate> V8TestSpecialOperations::domTemplate(v8::Isolate* isolate) { return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestSpecialOperationsTemplate); } bool V8TestSpecialOperations::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) { return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value); } v8::Handle<v8::Object> V8TestSpecialOperations::findInstanceInPrototypeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) { return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value); } TestSpecialOperations* V8TestSpecialOperations::toImplWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) { return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle<v8::Object>::Cast(value))->toImpl<TestSpecialOperations>() : 0; } void V8TestSpecialOperations::refObject(ScriptWrappableBase* scriptWrappableBase) { scriptWrappableBase->toImpl<TestSpecialOperations>()->ref(); } void V8TestSpecialOperations::derefObject(ScriptWrappableBase* scriptWrappableBase) { scriptWrappableBase->toImpl<TestSpecialOperations>()->deref(); } template<> v8::Handle<v8::Value> toV8NoInline(TestSpecialOperations* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) { return toV8(impl, creationContext, isolate); } } // namespace blink
Java
/*============================================================================* * * * This file is part of the Zoto Software suite. * * * * Copyright (C) 2004 Zoto, Inc. 123 South Hudson, OKC, OK 73102 * * * * Original algorithms taken from RFC 1321 * * Copyright (C) 1990-2, RSA Data Security, Inc. * * * *============================================================================*/ #include <Python.h> #include "ZTypes.h" #include "ZGlobals.h" extern void initialize_zsp_header(PyObject *m); extern void initialize_zsp_auth(PyObject *m); extern void initialize_zsp_auth_resp(PyObject *m); extern void initialize_zsp_version(PyObject *m); extern void initialize_zsp_version_resp(PyObject *m); extern void initialize_zsp_flag(PyObject *m); extern void initialize_zsp_flag_resp(PyObject *m); extern void initialize_zsp_file(PyObject *m); extern void initialize_zsp_file_resp(PyObject *m); extern void initialize_zsp_done(PyObject *m); extern void initialize_zsp_done_resp(PyObject *m); extern void initialize_zsp_error(PyObject *m); #ifndef PyMODINIT_FUNC #define PyMODINIT_FUNC void #endif static PyMethodDef module_methods[] = { {NULL} /* Sentinel */ }; PyMODINIT_FUNC initzsp_packets(void) { PyObject *m; m = Py_InitModule3("zsp_packets", module_methods, "Authorization packet."); if (m == NULL) return; PyModule_AddIntConstant(m, "ZSP_NONE", ZSP_NONE); PyModule_AddIntConstant(m, "ZSP_QUIT", ZSP_QUIT); PyModule_AddIntConstant(m, "ZSP_AUTH", ZSP_AUTH); PyModule_AddIntConstant(m, "ZSP_VERSION", ZSP_VERSION); PyModule_AddIntConstant(m, "ZSP_FLAG", ZSP_FLAG); PyModule_AddIntConstant(m, "ZSP_FILE", ZSP_FILE); PyModule_AddIntConstant(m, "ZSP_DONE", ZSP_DONE); PyModule_AddIntConstant(m, "ZSP_QUIT_RESP", ZSP_QUIT_RESP); PyModule_AddIntConstant(m, "ZSP_AUTH_RESP", ZSP_AUTH_RESP); PyModule_AddIntConstant(m, "ZSP_VERSION_RESP", ZSP_VERSION_RESP); PyModule_AddIntConstant(m, "ZSP_FLAG_RESP", ZSP_FLAG_RESP); PyModule_AddIntConstant(m, "ZSP_FILE_RESP", ZSP_FILE_RESP); PyModule_AddIntConstant(m, "ZSP_DONE_RESP", ZSP_DONE_RESP); PyModule_AddIntConstant(m, "ZSP_ERROR", ZSP_ERROR); PyModule_AddIntConstant(m, "ZSP_JPEG", ZSP_JPEG); PyModule_AddIntConstant(m, "ZSP_PNG", ZSP_PNG); PyModule_AddIntConstant(m, "ZSP_GIF", ZSP_GIF); PyModule_AddIntConstant(m, "ZSP_BMP", ZSP_BMP); PyModule_AddIntConstant(m, "ZSP_TIFF", ZSP_TIFF); PyModule_AddIntConstant(m, "ZSP_TARGA", ZSP_TARGA); // Return codes PyModule_AddIntConstant(m, "ZSP_AUTH_OK", ZSP_AUTH_OK); PyModule_AddIntConstant(m, "ZSP_AUTH_BAD", ZSP_AUTH_BAD); PyModule_AddIntConstant(m, "ZSP_VERS_GOOD", ZSP_VERS_GOOD); PyModule_AddIntConstant(m, "ZSP_VERS_OLD", ZSP_VERS_OLD); PyModule_AddIntConstant(m, "ZSP_VERS_BAD", ZSP_VERS_BAD); PyModule_AddIntConstant(m, "ZSP_FILE_OK", ZSP_FILE_OK); PyModule_AddIntConstant(m, "ZSP_FILE_NO_FLAG", ZSP_FILE_NO_FLAG); PyModule_AddIntConstant(m, "ZSP_FILE_BAD", ZSP_FILE_BAD); PyModule_AddIntConstant(m, "ZSP_DONE_OK", ZSP_DONE_OK); PyModule_AddIntConstant(m, "ZSP_DONE_BAD_SUM", ZSP_DONE_BAD_SUM); PyModule_AddIntConstant(m, "ZSP_DONE_BAD_SYNC", ZSP_DONE_BAD_SYNC); PyModule_AddIntConstant(m, "ZSP_DONE_BAD_SYNC2", ZSP_DONE_BAD_SYNC2); PyModule_AddIntConstant(m, "ZSP_DONE_CORRUPT", ZSP_DONE_CORRUPT); PyModule_AddIntConstant(m, "ZSP_DONE_BAD_WRITE", ZSP_DONE_BAD_WRITE); initialize_zsp_header(m); initialize_zsp_auth(m); initialize_zsp_auth_resp(m); initialize_zsp_version(m); initialize_zsp_version_resp(m); initialize_zsp_flag(m); initialize_zsp_flag_resp(m); initialize_zsp_file(m); initialize_zsp_file_resp(m); initialize_zsp_done(m); initialize_zsp_done_resp(m); initialize_zsp_error(m); }
Java
/* * $Id$ */ /* Copyright (c) 2000-2004 Board of Trustees of Leland Stanford Jr. University, all rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL STANFORD UNIVERSITY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Stanford University shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Stanford University. */ package org.lockss.mail; import java.io.*; import java.util.*; import java.net.*; import org.apache.oro.text.regex.*; import javax.mail.*; import javax.mail.internet.*; // import javax.activation.*; import org.lockss.test.*; import org.lockss.mail.*; import org.lockss.util.*; import org.lockss.daemon.*; import org.lockss.plugin.*; public class TestMimeMessage extends LockssTestCase { // The generated message is checked against these patterns, in a way that // is too brittle (order dependent, etc.). If the format of the message // changes innocuously the patterns and/or tests may have to be changed static final String PAT_MESSAGE_ID = "^Message-ID: "; static final String PAT_MIME_VERSION = "^MIME-Version: 1.0"; static final String PAT_CONTENT_TYPE = "^Content-Type: "; static final String PAT_FROM = "^From: "; static final String PAT_TO = "^To: "; static final String PAT_BOUNDARY = "^------=_Part"; static final String PAT_CONTENT_TRANSFER_ENCODING = "^Content-Transfer-Encoding: "; static final String PAT_CONTENT_DISPOSITION = "^Content-Disposition: "; String toString(MailMessage msg) { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); BufferedOutputStream out = new BufferedOutputStream(baos); msg.writeData(out); out.flush(); return baos.toString(); } catch (IOException e) { throw new RuntimeException("Error converting MimeMessage to string", e); } } /** Return the header part (lines preceding first blank line) */ String getHeader(String body) { List lst = StringUtil.breakAt(body, "\r\n\r\n"); if (lst.size() < 1) return null; return (String)lst.get(0); } /** Return the header part (lines preceding first blank line) */ String getHeader(MimeMessage msg) { return getHeader(toString(msg)); } /** Return the body part (lines following first blank line) */ String getBody(String body) { int pos = body.indexOf("\r\n\r\n"); if (pos < 0) return null; return body.substring(pos+4); } /** Return the body part (lines following first blank line) */ String getBody(MimeMessage msg) { return getBody(toString(msg)); } /** Break a string at <crlf>s into an array of lines */ String[] getLines(String body) { List lst = StringUtil.breakAt(body, "\r\n"); return (String[])lst.toArray(new String[0]); } String[] getHeaderLines(MimeMessage msg) { return getLines(getHeader(msg)); } String[] getBodyLines(MimeMessage msg) { return getLines(getBody(msg)); } /** assert that the pattern exists in the string, interpreting the string * as having multiple lines */ void assertHeaderLine(String expPat, String hdr) { Pattern pat = RegexpUtil.uncheckedCompile(expPat, Perl5Compiler.MULTILINE_MASK); assertMatchesRE(pat, hdr); } /** assert that the message starts with the expected header */ void assertHeader(MimeMessage msg) { assertHeader(null, null, msg); } /** assert that the message starts with the expected header */ void assertHeader(String expFrom, String expTo, MimeMessage msg) { String hdr = getHeader(msg); assertHeaderLine(PAT_MESSAGE_ID, hdr); assertHeaderLine(PAT_MIME_VERSION, hdr); assertHeaderLine(PAT_CONTENT_TYPE, hdr); if (expFrom != null) { assertHeaderLine(PAT_FROM + expFrom, hdr); } if (expTo != null) { assertHeaderLine(PAT_TO + expTo, hdr); } } /** assert that the array of lines is a MIME text-part with the expected * text */ void assertTextPart(String expText, String[]lines, int idx) { assertMatchesRE(PAT_BOUNDARY, lines[idx + 0]); assertMatchesRE(PAT_CONTENT_TYPE + "text/plain; charset=us-ascii", lines[idx + 1]); assertMatchesRE(PAT_CONTENT_TRANSFER_ENCODING + "7bit", lines[idx + 2]); assertEquals("", lines[idx + 3]); assertEquals(expText, lines[idx + 4]); assertMatchesRE(PAT_BOUNDARY, lines[idx + 5]); } public void testNull() throws IOException { MimeMessage msg = new MimeMessage(); assertHeader(msg); assertEquals(2, getBodyLines(msg).length); assertMatchesRE(PAT_BOUNDARY, getBody(msg)); assertEquals("", getBodyLines(msg)[1]); } public void testGetHeader() throws IOException { MimeMessage msg = new MimeMessage(); msg.addHeader("From", "me"); msg.addHeader("To", "you"); msg.addHeader("To", "and you"); assertEquals("me", msg.getHeader("From")); assertEquals("you, and you", msg.getHeader("To")); assertEquals(null, msg.getHeader("xxxx")); } public void testText() throws IOException { MimeMessage msg = new MimeMessage(); msg.addHeader("From", "me"); msg.addHeader("To", "you"); msg.addHeader("Subject", "topic"); msg.addTextPart("Message\ntext"); assertHeader("me", "you", msg); String[] blines = getBodyLines(msg); log.debug2("msg: " + StringUtil.separatedString(blines, ", ")); assertTextPart("Message\ntext", blines, 0); } public void testDot() throws IOException { MimeMessage msg = new MimeMessage(); msg.addHeader("From", "me"); msg.addHeader("To", "you"); msg.addTextPart("one\n.\ntwo\n"); assertHeader("me", "you", msg); String[] blines = getBodyLines(msg); log.debug2("msg: " + StringUtil.separatedString(blines, ", ")); assertTextPart("one\n.\ntwo\n", blines, 0); } public void testTextAndFile() throws IOException { File file = FileTestUtil.writeTempFile("XXX", "\000\001\254\255this is a test"); MimeMessage msg = new MimeMessage(); msg.addHeader("From", "us"); msg.addHeader("To", "them"); msg.addHeader("Subject", "object"); msg.addTextPart("Explanatory text"); msg.addFile(file, "file.foo"); assertHeader("us", "them", msg); String[] blines = getBodyLines(msg); log.debug2("msg: " + StringUtil.separatedString(blines, ", ")); assertTextPart("Explanatory text", blines, 0); assertMatchesRE(PAT_CONTENT_TYPE + "application/octet-stream; name=file.foo", blines[6]); assertMatchesRE(PAT_CONTENT_TRANSFER_ENCODING + "base64", blines[7]); assertMatchesRE(PAT_CONTENT_DISPOSITION, blines[8]); assertEquals("", blines[9]); assertEquals("AAGsrXRoaXMgaXMgYSB0ZXN0", blines[10]); assertMatchesRE(PAT_BOUNDARY, blines[11]); assertTrue(file.exists()); msg.delete(true); assertTrue(file.exists()); } public void testGetParts() throws Exception { File file = FileTestUtil.writeTempFile("XXX", "\000\001\254\255this is a test"); MimeMessage msg = new MimeMessage(); msg.addTextPart("foo text"); msg.addFile(file, "file.foo"); MimeBodyPart[] parts = msg.getParts(); assertEquals(2, parts.length); assertEquals("foo text", parts[0].getContent()); assertEquals("file.foo", parts[1].getFileName()); } public void testTmpFile() throws IOException { File file = FileTestUtil.writeTempFile("XXX", "\000\001\254\255this is a test"); MimeMessage msg = new MimeMessage(); msg.addTmpFile(file, "file.foo"); assertTrue(file.exists()); msg.delete(true); assertFalse(file.exists()); } }
Java
# - Find LevelDB # # LEVELDB_INCLUDE_DIRS - List of LevelDB includes. # LEVELDB_LIBRARIES - List of libraries when using LevelDB. # LEVELDB_FOUND - True if LevelDB found # Look for the header of file. find_path(LEVELDB_INCLUDE NAMES leveldb/db.h PATHS $ENV{LEVELDB_ROOT}/include /opt/local/include /usr/local/include /usr/include DOC "Path in which the file leveldb/db.h is located.") # Look for the library. find_library(LEVELDB_LIBRARY NAMES leveldb PATHS $ENV{LEVELDB_ROOT}/lib /usr/local/lib /usr/lib DOC "Path to leveldb library.") include(FindPackageHandleStandardArgs) find_package_handle_standard_args(LevelDB DEFAULT_MSG LEVELDB_INCLUDE LEVELDB_LIBRARY) if(LEVELDB_FOUND) set(LEVELDB_INCLUDE_DIRS ${LEVELDB_INCLUDE}) set(LEVELDB_LIBRARIES ${LEVELDB_LIBRARY}) mark_as_advanced(LEVELDB_INCLUDE LEVELDB_LIBRARY) message(STATUS "Found LevelDB (include: ${LEVELDB_INCLUDE_DIRS}, library: ${LEVELDB_LIBRARIES})") endif()
Java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE90_LDAP_Injection__w32_wchar_t_connect_socket_31.c Label Definition File: CWE90_LDAP_Injection__w32.label.xml Template File: sources-sink-31.tmpl.c */ /* * @description * CWE: 90 LDAP Injection * BadSource: connect_socket Read data using a connect socket (client side) * GoodSource: Use a fixed string * Sinks: * BadSink : data concatenated into LDAP search, which could result in LDAP Injection * Flow Variant: 31 Data flow using a copy of data within the same function * * */ #include "std_testcase.h" #ifdef _WIN32 #include <winsock2.h> #include <windows.h> #include <direct.h> #pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */ #define CLOSE_SOCKET closesocket #else /* NOT _WIN32 */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #define INVALID_SOCKET -1 #define SOCKET_ERROR -1 #define CLOSE_SOCKET close #define SOCKET int #endif #define TCP_PORT 27015 #define IP_ADDRESS "127.0.0.1" #include <Winldap.h> #pragma comment(lib, "wldap32") #ifndef OMITBAD void CWE90_LDAP_Injection__w32_wchar_t_connect_socket_31_bad() { wchar_t * data; wchar_t dataBuffer[256] = L""; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET connectSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ /* Abort on error or the connection was closed */ recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(wchar_t) * (256 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } { wchar_t * dataCopy = data; wchar_t * data = dataCopy; { LDAP* pLdapConnection = NULL; ULONG connectSuccess = 0L; ULONG searchSuccess = 0L; LDAPMessage *pMessage = NULL; wchar_t filter[256]; /* POTENTIAL FLAW: data concatenated into LDAP search, which could result in LDAP Injection*/ _snwprintf(filter, 256-1, L"(cn=%s)", data); pLdapConnection = ldap_initW(L"localhost", LDAP_PORT); if (pLdapConnection == NULL) { printLine("Initialization failed"); exit(1); } connectSuccess = ldap_connect(pLdapConnection, NULL); if (connectSuccess != LDAP_SUCCESS) { printLine("Connection failed"); exit(1); } searchSuccess = ldap_search_ext_sW( pLdapConnection, L"base", LDAP_SCOPE_SUBTREE, filter, NULL, 0, NULL, NULL, LDAP_NO_LIMIT, LDAP_NO_LIMIT, &pMessage); if (searchSuccess != LDAP_SUCCESS) { printLine("Search failed"); if (pMessage != NULL) { ldap_msgfree(pMessage); } exit(1); } /* Typically you would do something with the search results, but this is a test case and we can ignore them */ /* Free the results to avoid incidentals */ if (pMessage != NULL) { ldap_msgfree(pMessage); } /* Close the connection */ ldap_unbind(pLdapConnection); } } } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B() uses the GoodSource with the BadSink */ static void goodG2B() { wchar_t * data; wchar_t dataBuffer[256] = L""; data = dataBuffer; /* FIX: Use a fixed file name */ wcscat(data, L"Doe, XXXXX"); { wchar_t * dataCopy = data; wchar_t * data = dataCopy; { LDAP* pLdapConnection = NULL; ULONG connectSuccess = 0L; ULONG searchSuccess = 0L; LDAPMessage *pMessage = NULL; wchar_t filter[256]; /* POTENTIAL FLAW: data concatenated into LDAP search, which could result in LDAP Injection*/ _snwprintf(filter, 256-1, L"(cn=%s)", data); pLdapConnection = ldap_initW(L"localhost", LDAP_PORT); if (pLdapConnection == NULL) { printLine("Initialization failed"); exit(1); } connectSuccess = ldap_connect(pLdapConnection, NULL); if (connectSuccess != LDAP_SUCCESS) { printLine("Connection failed"); exit(1); } searchSuccess = ldap_search_ext_sW( pLdapConnection, L"base", LDAP_SCOPE_SUBTREE, filter, NULL, 0, NULL, NULL, LDAP_NO_LIMIT, LDAP_NO_LIMIT, &pMessage); if (searchSuccess != LDAP_SUCCESS) { printLine("Search failed"); if (pMessage != NULL) { ldap_msgfree(pMessage); } exit(1); } /* Typically you would do something with the search results, but this is a test case and we can ignore them */ /* Free the results to avoid incidentals */ if (pMessage != NULL) { ldap_msgfree(pMessage); } /* Close the connection */ ldap_unbind(pLdapConnection); } } } void CWE90_LDAP_Injection__w32_wchar_t_connect_socket_31_good() { goodG2B(); } #endif /* OMITGOOD */ /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); CWE90_LDAP_Injection__w32_wchar_t_connect_socket_31_good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); CWE90_LDAP_Injection__w32_wchar_t_connect_socket_31_bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
Java
/* MobileRobots Advanced Robotics Interface for Applications (ARIA) Copyright (C) 2004, 2005 ActivMedia Robotics LLC Copyright (C) 2006, 2007 MobileRobots Inc. 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. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA If you wish to redistribute ARIA under different terms, contact MobileRobots for information about a commercial version of ARIA at [email protected] or MobileRobots Inc, 19 Columbia Drive, Amherst, NH 03031; 800-639-9481 */ #ifndef ARACTIONGOTOSTRAIGHT_H #define ARACTIONGOTOSTRAIGHT_H #include "ariaTypedefs.h" #include "ariaUtil.h" #include "ArAction.h" /// This action goes to a given ArPose very naively /** This action naively drives straight towards a given ArPose. The action stops the robot when it has travelled the distance that that pose is away. It travels at 'speed' mm/sec. You can give it a new goal pose with setGoal(), cancel its movement with cancelGoal(), and see if it got there with haveAchievedGoal(). For arguments to the goals and encoder goals you can tell it to go backwards by calling them with the backwards parameter true. If you set the justDistance to true it will only really care about having driven the distance, if false it'll try to get to the spot you wanted within close distance. This doesn't avoid obstacles or anything, you could add have an obstacle avoidance ArAction at a higher priority to try to do this. (For truly intelligent navigation, see ActivMedia's ARNL software.) **/ class ArActionGotoStraight : public ArAction { public: AREXPORT ArActionGotoStraight(const char *name = "goto", double speed = 400); AREXPORT virtual ~ArActionGotoStraight(); /// Sees if the goal has been achieved AREXPORT bool haveAchievedGoal(void); /// Cancels the goal the robot has AREXPORT void cancelGoal(void); /// Sets a new goal and sets the action to go there AREXPORT void setGoal(ArPose goal, bool backwards = false, bool justDistance = true); /// Sets the goal in a relative way AREXPORT void setGoalRel(double dist, double deltaHeading, bool backwards = false, bool justDistance = true); /// Gets the goal the action has ArPose getGoal(void) { return myGoal; } /// Gets whether we're using the encoder goal or the normal goal bool usingEncoderGoal(void) { return myUseEncoderGoal; } /// Sets a new goal and sets the action to go there AREXPORT void setEncoderGoal(ArPose encoderGoal, bool backwards = false, bool justDistance = true); /// Sets the goal in a relative way AREXPORT void setEncoderGoalRel(double dist, double deltaHeading, bool backwards = false, bool justDistance = true); /// Gets the goal the action has ArPose getEncoderGoal(void) { return myEncoderGoal; } /// Sets the speed the action will travel to the goal at (mm/sec) void setSpeed(double speed) { mySpeed = speed; } /// Gets the speed the action will travel to the goal at (mm/sec) double getSpeed(void) { return mySpeed; } /// Sets how close we have to get if we're not in just distance mode void setCloseDist(double closeDist = 100) { myCloseDist = closeDist; } /// Gets how close we have to get if we're not in just distance mode double getCloseDist(void) { return myCloseDist; } /// Sets whether we're backing up there or not (set in the setGoals) bool getBacking(void) { return myBacking; } AREXPORT virtual ArActionDesired *fire(ArActionDesired currentDesired); /*AREXPORT*/ virtual ArActionDesired *getDesired(void) { return &myDesired; } #ifndef SWIG /*AREXPORT*/ virtual const ArActionDesired *getDesired(void) const { return &myDesired; } #endif protected: ArPose myGoal; bool myUseEncoderGoal; ArPose myEncoderGoal; double mySpeed; bool myBacking; ArActionDesired myDesired; bool myPrinting; double myDist; double myCloseDist; bool myJustDist; double myDistTravelled; ArPose myLastPose; enum State { STATE_NO_GOAL, STATE_ACHIEVED_GOAL, STATE_GOING_TO_GOAL }; State myState; }; #endif // ARACTIONGOTO
Java
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_MEDIA_WEBRTC_SAME_ORIGIN_OBSERVER_H_ #define CHROME_BROWSER_MEDIA_WEBRTC_SAME_ORIGIN_OBSERVER_H_ #include "base/callback.h" #include "content/public/browser/web_contents_observer.h" #include "url/gurl.h" namespace content { class WebContents; } // This observer class will trigger the provided callback whenever the observed // WebContents's origin either now or no longer matches the provided origin. // This will not trigger the callback until the navigation has been committed, // so that WebContents::GetLastCommittedURL will return the new origin, and thus // allow for easier code re-use. Note that that Loading hasn't actually started // yet, so this is still suitable for listening to for i.e. terminating tab // capture when a site is no longer the same origin. class SameOriginObserver : public content::WebContentsObserver { public: SameOriginObserver(content::WebContents* observed_contents, const GURL& reference_origin, base::RepeatingCallback<void(content::WebContents*)> on_same_origin_state_changed); ~SameOriginObserver() override; // WebContentsObserver void DidFinishNavigation( content::NavigationHandle* navigation_handle) override; private: content::WebContents* const observed_contents_; const GURL reference_origin_; base::RepeatingCallback<void(content::WebContents*)> on_same_origin_state_changed_; bool is_same_origin_ = false; }; #endif // CHROME_BROWSER_MEDIA_WEBRTC_SAME_ORIGIN_OBSERVER_H_
Java
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="html/html; charset=utf-8" /> <title>LeapVector Class Reference</title> <meta id="xcode-display" name="xcode-display" content="render"/> <link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" /> <link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" /> <meta name="generator" content="appledoc 2.1 (build 858)" /> </head> <body> <header id="top_header"> <div id="library" class="hideInXcode"> <h1><a id="libraryTitle" href="../index.html">Leap Motion API </a></h1> <a id="developerHome" href="../index.html">Leap Motion</a> </div> <div id="title" role="banner"> <h1 class="hideInXcode">LeapVector Class Reference</h1> </div> <ul id="headerButtons" role="toolbar"> <li id="toc_button"> <button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button> </li> <li id="jumpto_button" role="navigation"> <select id="jumpTo"> <option value="top">Jump To&#133;</option> <option value="overview">Overview</option> <option value="tasks">Tasks</option> <option value="properties">Properties</option> <option value="//api/name/x">&nbsp;&nbsp;&nbsp;&nbsp;x</option> <option value="//api/name/y">&nbsp;&nbsp;&nbsp;&nbsp;y</option> <option value="//api/name/z">&nbsp;&nbsp;&nbsp;&nbsp;z</option> <option value="class_methods">Class Methods</option> <option value="//api/name/backward">&nbsp;&nbsp;&nbsp;&nbsp;+ backward</option> <option value="//api/name/down">&nbsp;&nbsp;&nbsp;&nbsp;+ down</option> <option value="//api/name/forward">&nbsp;&nbsp;&nbsp;&nbsp;+ forward</option> <option value="//api/name/left">&nbsp;&nbsp;&nbsp;&nbsp;+ left</option> <option value="//api/name/right">&nbsp;&nbsp;&nbsp;&nbsp;+ right</option> <option value="//api/name/up">&nbsp;&nbsp;&nbsp;&nbsp;+ up</option> <option value="//api/name/xAxis">&nbsp;&nbsp;&nbsp;&nbsp;+ xAxis</option> <option value="//api/name/yAxis">&nbsp;&nbsp;&nbsp;&nbsp;+ yAxis</option> <option value="//api/name/zAxis">&nbsp;&nbsp;&nbsp;&nbsp;+ zAxis</option> <option value="//api/name/zero">&nbsp;&nbsp;&nbsp;&nbsp;+ zero</option> <option value="instance_methods">Instance Methods</option> <option value="//api/name/angleTo:">&nbsp;&nbsp;&nbsp;&nbsp;- angleTo:</option> <option value="//api/name/cross:">&nbsp;&nbsp;&nbsp;&nbsp;- cross:</option> <option value="//api/name/distanceTo:">&nbsp;&nbsp;&nbsp;&nbsp;- distanceTo:</option> <option value="//api/name/divide:">&nbsp;&nbsp;&nbsp;&nbsp;- divide:</option> <option value="//api/name/dot:">&nbsp;&nbsp;&nbsp;&nbsp;- dot:</option> <option value="//api/name/equals:">&nbsp;&nbsp;&nbsp;&nbsp;- equals:</option> <option value="//api/name/initWithVector:">&nbsp;&nbsp;&nbsp;&nbsp;- initWithVector:</option> <option value="//api/name/initWithX:y:z:">&nbsp;&nbsp;&nbsp;&nbsp;- initWithX:y:z:</option> <option value="//api/name/magnitude">&nbsp;&nbsp;&nbsp;&nbsp;- magnitude</option> <option value="//api/name/magnitudeSquared">&nbsp;&nbsp;&nbsp;&nbsp;- magnitudeSquared</option> <option value="//api/name/minus:">&nbsp;&nbsp;&nbsp;&nbsp;- minus:</option> <option value="//api/name/negate">&nbsp;&nbsp;&nbsp;&nbsp;- negate</option> <option value="//api/name/normalized">&nbsp;&nbsp;&nbsp;&nbsp;- normalized</option> <option value="//api/name/pitch">&nbsp;&nbsp;&nbsp;&nbsp;- pitch</option> <option value="//api/name/plus:">&nbsp;&nbsp;&nbsp;&nbsp;- plus:</option> <option value="//api/name/roll">&nbsp;&nbsp;&nbsp;&nbsp;- roll</option> <option value="//api/name/times:">&nbsp;&nbsp;&nbsp;&nbsp;- times:</option> <option value="//api/name/toFloatPointer">&nbsp;&nbsp;&nbsp;&nbsp;- toFloatPointer</option> <option value="//api/name/toNSArray">&nbsp;&nbsp;&nbsp;&nbsp;- toNSArray</option> <option value="//api/name/yaw">&nbsp;&nbsp;&nbsp;&nbsp;- yaw</option> </select> </li> </ul> </header> <nav id="tocContainer" class="isShowingTOC"> <ul id="toc" role="tree"> <li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li> <li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul> </ul></li> <li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/x">x</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/y">y</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/z">z</a></span></li> </ul></li> <li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/backward">backward</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/down">down</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/forward">forward</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/left">left</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/right">right</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/up">up</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/xAxis">xAxis</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/yAxis">yAxis</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/zAxis">zAxis</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/zero">zero</a></span></li> </ul></li> <li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/angleTo:">angleTo:</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cross:">cross:</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/distanceTo:">distanceTo:</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/divide:">divide:</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/dot:">dot:</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/equals:">equals:</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initWithVector:">initWithVector:</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initWithX:y:z:">initWithX:y:z:</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/magnitude">magnitude</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/magnitudeSquared">magnitudeSquared</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/minus:">minus:</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/negate">negate</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/normalized">normalized</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/pitch">pitch</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/plus:">plus:</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/roll">roll</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/times:">times:</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/toFloatPointer">toFloatPointer</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/toNSArray">toNSArray</a></span></li> <li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/yaw">yaw</a></span></li> </ul></li> </ul> </nav> <article> <div id="contents" class="isShowingTOC" role="main"> <a title="LeapVector Class Reference" name="top"></a> <div class="main-navigation navigation-top"> <ul> <li><a href="../index.html">Index</a></li> <li><a href="../hierarchy.html">Hierarchy</a></li> </ul> </div> <div id="header"> <div class="section-header"> <h1 class="title title-header">LeapVector Class Reference</h1> </div> </div> <div id="container"> <div class="section section-specification"><table cellspacing="0"><tbody> <tr> <td class="specification-title">Inherits from</td> <td class="specification-value">NSObject</td> </tr><tr> <td class="specification-title">Declared in</td> <td class="specification-value">LeapObjectiveC.h</td> </tr> </tbody></table></div> <div class="section section-overview"> <a title="Overview" name="overview"></a> <h2 class="subtitle subtitle-overview">Overview</h2> <p>The LeapVector class represents a three-component mathematical vector or point<br/> such as a direction or position in three-dimensional space.</p> <p>The Leap software employs a right-handed Cartesian coordinate system.<br/> Values given are in units of real-world millimeters. The origin is centered<br/> at the center of the Leap device. The x- and z-axes lie in the horizontal<br/> plane, with the x-axis running parallel to the long edge of the device.<br/> The y-axis is vertical, with positive values increasing upwards (in contrast<br/> to the downward orientation of most computer graphics coordinate systems).<br/> The z-axis has positive values increasing away from the computer screen.</p> <p><img src="../docs/images/Leap_Axes.png"/></p> </div> <div class="section section-tasks"> <a title="Tasks" name="tasks"></a> <h2 class="subtitle subtitle-tasks">Tasks</h2> <ul class="task-list"> <li> <span class="tooltip"> <code><a href="#//api/name/initWithX:y:z:">&ndash;&nbsp;initWithX:y:z:</a></code> <span class="tooltip"><p>Creates a new LeapVector with the specified component values.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/initWithVector:">&ndash;&nbsp;initWithVector:</a></code> <span class="tooltip"><p>Copies the specified LeapVector.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/magnitude">&ndash;&nbsp;magnitude</a></code> <span class="tooltip"><p>The magnitude, or length, of this vector.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/magnitudeSquared">&ndash;&nbsp;magnitudeSquared</a></code> <span class="tooltip"><p>The square of the magnitude, or length, of this vector.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/distanceTo:">&ndash;&nbsp;distanceTo:</a></code> <span class="tooltip"><p>The distance between the point represented by this LeapVector<br/> object and a point represented by the specified LeapVector object.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/angleTo:">&ndash;&nbsp;angleTo:</a></code> <span class="tooltip"><p>The angle between this vector and the specified vector in radians.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/pitch">&ndash;&nbsp;pitch</a></code> <span class="tooltip"><p>The pitch angle in radians.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/roll">&ndash;&nbsp;roll</a></code> <span class="tooltip"><p>The roll angle in radians.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/yaw">&ndash;&nbsp;yaw</a></code> <span class="tooltip"><p>The yaw angle in radians.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/plus:">&ndash;&nbsp;plus:</a></code> <span class="tooltip"><p>Adds two vectors.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/minus:">&ndash;&nbsp;minus:</a></code> <span class="tooltip"><p>Subtract a vector from this vector.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/negate">&ndash;&nbsp;negate</a></code> <span class="tooltip"><p>Negate this vector.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/times:">&ndash;&nbsp;times:</a></code> <span class="tooltip"><p>Multiply this vector by a number.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/divide:">&ndash;&nbsp;divide:</a></code> <span class="tooltip"><p>Divide this vector by a number.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/equals:">&ndash;&nbsp;equals:</a></code> <span class="tooltip"><p>Checks LeapVector equality.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/dot:">&ndash;&nbsp;dot:</a></code> <span class="tooltip"><p>The dot product of this vector with another vector.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/cross:">&ndash;&nbsp;cross:</a></code> <span class="tooltip"><p>The cross product of this vector and the specified vector.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/normalized">&ndash;&nbsp;normalized</a></code> <span class="tooltip"><p>A normalized copy of this vector.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/toNSArray">&ndash;&nbsp;toNSArray</a></code> <span class="tooltip"><p>Returns an NSArray object containing the vector components in the<br/> order: x, y, z.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/toFloatPointer">&ndash;&nbsp;toFloatPointer</a></code> <span class="tooltip"><p>Returns an NSMutableData object containing the vector components as<br/> consecutive floating point values.</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/zero">+&nbsp;zero</a></code> <span class="tooltip"><p>The zero vector: (0, 0, 0)</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/xAxis">+&nbsp;xAxis</a></code> <span class="tooltip"><p>The x-axis unit vector: (1, 0, 0).</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/yAxis">+&nbsp;yAxis</a></code> <span class="tooltip"><p>The y-axis unit vector: (0, 1, 0).</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/zAxis">+&nbsp;zAxis</a></code> <span class="tooltip"><p>The z-axis unit vector: (0, 0, 1).</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/left">+&nbsp;left</a></code> <span class="tooltip"><p>The unit vector pointing left along the negative x-axis: (-1, 0, 0).</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/right">+&nbsp;right</a></code> <span class="tooltip"><p>The unit vector pointing right along the positive x-axis: (1, 0, 0).</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/down">+&nbsp;down</a></code> <span class="tooltip"><p>The unit vector pointing down along the negative y-axis: (0, -1, 0).</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/up">+&nbsp;up</a></code> <span class="tooltip"><p>The unit vector pointing up along the positive y-axis: (0, 1, 0).</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/forward">+&nbsp;forward</a></code> <span class="tooltip"><p>The unit vector pointing forward along the negative z-axis: (0, 0, -1).</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/backward">+&nbsp;backward</a></code> <span class="tooltip"><p>The unit vector pointing backward along the positive z-axis: (0, 0, 1).</p></span> </span> </li><li> <span class="tooltip"> <code><a href="#//api/name/x">&nbsp;&nbsp;x</a></code> <span class="tooltip"><p>The horizontal component.</p></span> </span> <span class="task-item-suffix">property</span> </li><li> <span class="tooltip"> <code><a href="#//api/name/y">&nbsp;&nbsp;y</a></code> <span class="tooltip"><p>The vertical component.</p></span> </span> <span class="task-item-suffix">property</span> </li><li> <span class="tooltip"> <code><a href="#//api/name/z">&nbsp;&nbsp;z</a></code> <span class="tooltip"><p>The depth component.</p></span> </span> <span class="task-item-suffix">property</span> </li> </ul> </div> <div class="section section-methods"> <a title="Properties" name="properties"></a> <h2 class="subtitle subtitle-methods">Properties</h2> <div class="section-method"> <a name="//api/name/x" title="x"></a> <h3 class="subsubtitle method-title">x</h3> <div class="method-subsection brief-description"> <p>The horizontal component.</p> </div> <div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readonly) float x</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The horizontal component.</p> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/y" title="y"></a> <h3 class="subsubtitle method-title">y</h3> <div class="method-subsection brief-description"> <p>The vertical component.</p> </div> <div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readonly) float y</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The vertical component.</p> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/z" title="z"></a> <h3 class="subsubtitle method-title">z</h3> <div class="method-subsection brief-description"> <p>The depth component.</p> </div> <div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readonly) float z</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The depth component.</p> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> </div> <div class="section section-methods"> <a title="Class Methods" name="class_methods"></a> <h2 class="subtitle subtitle-methods">Class Methods</h2> <div class="section-method"> <a name="//api/name/backward" title="backward"></a> <h3 class="subsubtitle method-title">backward</h3> <div class="method-subsection brief-description"> <p>The unit vector pointing backward along the positive z-axis: (0, 0, 1).</p> </div> <div class="method-subsection method-declaration"><code>+ (LeapVector *)backward</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The unit vector pointing backward along the positive z-axis: (0, 0, 1).</p> <pre><code> LeapVector *backwardVector = [LeapVector backward]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/down" title="down"></a> <h3 class="subsubtitle method-title">down</h3> <div class="method-subsection brief-description"> <p>The unit vector pointing down along the negative y-axis: (0, -1, 0).</p> </div> <div class="method-subsection method-declaration"><code>+ (LeapVector *)down</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The unit vector pointing down along the negative y-axis: (0, -1, 0).</p> <pre><code> LeapVector *downVector = [LeapVector down]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/forward" title="forward"></a> <h3 class="subsubtitle method-title">forward</h3> <div class="method-subsection brief-description"> <p>The unit vector pointing forward along the negative z-axis: (0, 0, -1).</p> </div> <div class="method-subsection method-declaration"><code>+ (LeapVector *)forward</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The unit vector pointing forward along the negative z-axis: (0, 0, -1).</p> <pre><code> LeapVector *forwardVector = [LeapVector forward]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/left" title="left"></a> <h3 class="subsubtitle method-title">left</h3> <div class="method-subsection brief-description"> <p>The unit vector pointing left along the negative x-axis: (-1, 0, 0).</p> </div> <div class="method-subsection method-declaration"><code>+ (LeapVector *)left</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The unit vector pointing left along the negative x-axis: (-1, 0, 0).</p> <pre><code> LeapVector *leftVector = [LeapVector left]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/right" title="right"></a> <h3 class="subsubtitle method-title">right</h3> <div class="method-subsection brief-description"> <p>The unit vector pointing right along the positive x-axis: (1, 0, 0).</p> </div> <div class="method-subsection method-declaration"><code>+ (LeapVector *)right</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The unit vector pointing right along the positive x-axis: (1, 0, 0).</p> <pre><code> LeapVector *rightVector = [LeapVector right]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/up" title="up"></a> <h3 class="subsubtitle method-title">up</h3> <div class="method-subsection brief-description"> <p>The unit vector pointing up along the positive y-axis: (0, 1, 0).</p> </div> <div class="method-subsection method-declaration"><code>+ (LeapVector *)up</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The unit vector pointing up along the positive y-axis: (0, 1, 0).</p> <pre><code> LeapVector *upVector = [LeapVector up]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/xAxis" title="xAxis"></a> <h3 class="subsubtitle method-title">xAxis</h3> <div class="method-subsection brief-description"> <p>The x-axis unit vector: (1, 0, 0).</p> </div> <div class="method-subsection method-declaration"><code>+ (LeapVector *)xAxis</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The x-axis unit vector: (1, 0, 0).</p> <pre><code> LeapVector *xAxisVector = [LeapVector xAxis]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/yAxis" title="yAxis"></a> <h3 class="subsubtitle method-title">yAxis</h3> <div class="method-subsection brief-description"> <p>The y-axis unit vector: (0, 1, 0).</p> </div> <div class="method-subsection method-declaration"><code>+ (LeapVector *)yAxis</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The y-axis unit vector: (0, 1, 0).</p> <pre><code> LeapVector *yAxisVector = [LeapVector yAxis]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/zAxis" title="zAxis"></a> <h3 class="subsubtitle method-title">zAxis</h3> <div class="method-subsection brief-description"> <p>The z-axis unit vector: (0, 0, 1).</p> </div> <div class="method-subsection method-declaration"><code>+ (LeapVector *)zAxis</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The z-axis unit vector: (0, 0, 1).</p> <pre><code> LeapVector *zAxisVector = [LeapVector zAxis]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/zero" title="zero"></a> <h3 class="subsubtitle method-title">zero</h3> <div class="method-subsection brief-description"> <p>The zero vector: (0, 0, 0)</p> </div> <div class="method-subsection method-declaration"><code>+ (LeapVector *)zero</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The zero vector: (0, 0, 0)</p> <pre><code> LeapVector *zeroVector = [LeapVector zero]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> </div> <div class="section section-methods"> <a title="Instance Methods" name="instance_methods"></a> <h2 class="subtitle subtitle-methods">Instance Methods</h2> <div class="section-method"> <a name="//api/name/angleTo:" title="angleTo:"></a> <h3 class="subsubtitle method-title">angleTo:</h3> <div class="method-subsection brief-description"> <p>The angle between this vector and the specified vector in radians.</p> </div> <div class="method-subsection method-declaration"><code>- (float)angleTo:(const LeapVector *)<em>vector</em></code></div> <div class="method-subsection arguments-section parameters"> <h4 class="method-subtitle parameter-title">Parameters</h4> <dl class="argument-def parameter-def"> <dt><em>vector</em></dt> <dd><p>A LeapVector object.</p></dd> </dl> </div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The angle between this vector and the specified vector in radians.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The angle between this vector and the specified vector in radians.</p> <pre><code> float angleInRadians = [[LeapVector xAxis] angleTo:[LeapVector yAxis]]; // angleInRadians = PI/2 (90 degrees) </code></pre> <p>The angle is measured in the plane formed by the two vectors. The<br/> angle returned is always the smaller of the two conjugate angles.<br/> Thus <code>[A angleTo:B] == [B angleTo:A]</code> and is always a positive<br/> value less than or equal to pi radians (180 degrees).</p> <p>If either vector has zero length, then this function returns zero.</p> <p><img src="../docs/images/Math_AngleTo.png"/></p> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/cross:" title="cross:"></a> <h3 class="subsubtitle method-title">cross:</h3> <div class="method-subsection brief-description"> <p>The cross product of this vector and the specified vector.</p> </div> <div class="method-subsection method-declaration"><code>- (LeapVector *)cross:(const LeapVector *)<em>vector</em></code></div> <div class="method-subsection arguments-section parameters"> <h4 class="method-subtitle parameter-title">Parameters</h4> <dl class="argument-def parameter-def"> <dt><em>vector</em></dt> <dd><p>A LeapVector object.</p></dd> </dl> </div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The cross product of this vector and the specified vector.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The cross product of this vector and the specified vector.</p> <pre><code> LeapVector *crossProduct = [thisVector cross:thatVector]; </code></pre> <p>The cross product is a vector orthogonal to both original vectors.<br/> It has a magnitude equal to the area of a parallelogram having the<br/> two vectors as sides. The direction of the returned vector is<br/> determined by the right-hand rule. Thus <code>[A cross:B] == [[B negate] cross:A]</code>.</p> <p><img src="../docs/images/Math_Cross.png"/></p> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/distanceTo:" title="distanceTo:"></a> <h3 class="subsubtitle method-title">distanceTo:</h3> <div class="method-subsection brief-description"> <p>The distance between the point represented by this LeapVector<br/> object and a point represented by the specified LeapVector object.</p> </div> <div class="method-subsection method-declaration"><code>- (float)distanceTo:(const LeapVector *)<em>vector</em></code></div> <div class="method-subsection arguments-section parameters"> <h4 class="method-subtitle parameter-title">Parameters</h4> <dl class="argument-def parameter-def"> <dt><em>vector</em></dt> <dd><p>A LeapVector object.</p></dd> </dl> </div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The distance from this point to the specified point.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The distance between the point represented by this LeapVector<br/> object and a point represented by the specified LeapVector object.</p> <pre><code> LeapVector *aPoint = [[LeapVector alloc] initWithX:10 y:0 z:0]; LeapVector *origin = [LeapVector zero]; float distance = [origin distanceTo:aPoint]; // distance = 10 </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/divide:" title="divide:"></a> <h3 class="subsubtitle method-title">divide:</h3> <div class="method-subsection brief-description"> <p>Divide this vector by a number.</p> </div> <div class="method-subsection method-declaration"><code>- (LeapVector *)divide:(float)<em>scalar</em></code></div> <div class="method-subsection arguments-section parameters"> <h4 class="method-subtitle parameter-title">Parameters</h4> <dl class="argument-def parameter-def"> <dt><em>scalar</em></dt> <dd><p>The scalar divisor;</p></dd> </dl> </div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The dividend of this LeapVector divided by a scalar.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>Divide this vector by a number.</p> <pre><code> LeapVector *quotient = [thisVector divide:2.5]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/dot:" title="dot:"></a> <h3 class="subsubtitle method-title">dot:</h3> <div class="method-subsection brief-description"> <p>The dot product of this vector with another vector.</p> </div> <div class="method-subsection method-declaration"><code>- (float)dot:(const LeapVector *)<em>vector</em></code></div> <div class="method-subsection arguments-section parameters"> <h4 class="method-subtitle parameter-title">Parameters</h4> <dl class="argument-def parameter-def"> <dt><em>vector</em></dt> <dd><p>A LeapVector object.</p></dd> </dl> </div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The dot product of this vector and the specified vector.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The dot product of this vector with another vector.</p> <pre><code> float dotProduct = [thisVector dot:thatVector]; </code></pre> <p>The dot product is the magnitude of the projection of this vector<br/> onto the specified vector.</p> <p><img src="../docs/images/Math_Dot.png"/></p> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/equals:" title="equals:"></a> <h3 class="subsubtitle method-title">equals:</h3> <div class="method-subsection brief-description"> <p>Checks LeapVector equality.</p> </div> <div class="method-subsection method-declaration"><code>- (BOOL)equals:(const LeapVector *)<em>vector</em></code></div> <div class="method-subsection arguments-section parameters"> <h4 class="method-subtitle parameter-title">Parameters</h4> <dl class="argument-def parameter-def"> <dt><em>vector</em></dt> <dd><p>The LeapVector to compare.</p></dd> </dl> </div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>YES, if the LeapVectors are equal.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>Checks LeapVector equality.</p> <pre><code> bool vectorsAreEqual = [thisVector equals:thatVector]; </code></pre> <p>Vectors are equal if each corresponding component is equal.</p> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/initWithVector:" title="initWithVector:"></a> <h3 class="subsubtitle method-title">initWithVector:</h3> <div class="method-subsection brief-description"> <p>Copies the specified LeapVector.</p> </div> <div class="method-subsection method-declaration"><code>- (id)initWithVector:(const LeapVector *)<em>vector</em></code></div> <div class="method-subsection arguments-section parameters"> <h4 class="method-subtitle parameter-title">Parameters</h4> <dl class="argument-def parameter-def"> <dt><em>vector</em></dt> <dd><p>The LeapVector to copy.</p></dd> </dl> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>Copies the specified LeapVector.</p> <pre><code> LeapVector *copiedVector = [[LeapVector alloc] initWithVector:otherVector]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/initWithX:y:z:" title="initWithX:y:z:"></a> <h3 class="subsubtitle method-title">initWithX:y:z:</h3> <div class="method-subsection brief-description"> <p>Creates a new LeapVector with the specified component values.</p> </div> <div class="method-subsection method-declaration"><code>- (id)initWithX:(float)<em>x</em> y:(float)<em>y</em> z:(float)<em>z</em></code></div> <div class="method-subsection arguments-section parameters"> <h4 class="method-subtitle parameter-title">Parameters</h4> <dl class="argument-def parameter-def"> <dt><em>x</em></dt> <dd><p>The horizontal component.</p></dd> </dl> <dl class="argument-def parameter-def"> <dt><em>y</em></dt> <dd><p>The vertical component.</p></dd> </dl> <dl class="argument-def parameter-def"> <dt><em>z</em></dt> <dd><p>The depth component.</p></dd> </dl> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>Creates a new LeapVector with the specified component values.</p> <pre><code> LeapVector *newVector = [[LeapVector alloc] initWithX:0.5 y:200.3 z:67]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/magnitude" title="magnitude"></a> <h3 class="subsubtitle method-title">magnitude</h3> <div class="method-subsection brief-description"> <p>The magnitude, or length, of this vector.</p> </div> <div class="method-subsection method-declaration"><code>- (float)magnitude</code></div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The length of this vector.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The magnitude, or length, of this vector.</p> <pre><code> float length = thisVector.magnitude; </code></pre> <p>The magnitude is the L2 norm, or Euclidean distance between the origin and<br/> the point represented by the (x, y, z) components of this LeapVector object.</p> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/magnitudeSquared" title="magnitudeSquared"></a> <h3 class="subsubtitle method-title">magnitudeSquared</h3> <div class="method-subsection brief-description"> <p>The square of the magnitude, or length, of this vector.</p> </div> <div class="method-subsection method-declaration"><code>- (float)magnitudeSquared</code></div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The square of the length of this vector.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The square of the magnitude, or length, of this vector.</p> <pre><code> float lengthSquared = thisVector.magnitudeSquared; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/minus:" title="minus:"></a> <h3 class="subsubtitle method-title">minus:</h3> <div class="method-subsection brief-description"> <p>Subtract a vector from this vector.</p> </div> <div class="method-subsection method-declaration"><code>- (LeapVector *)minus:(const LeapVector *)<em>vector</em></code></div> <div class="method-subsection arguments-section parameters"> <h4 class="method-subtitle parameter-title">Parameters</h4> <dl class="argument-def parameter-def"> <dt><em>vector</em></dt> <dd><p>the LeapVector subtrahend.</p></dd> </dl> </div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>the difference between the two LeapVectors.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>Subtract a vector from this vector.</p> <pre><code> LeapVector *difference = [thisVector minus:thatVector]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/negate" title="negate"></a> <h3 class="subsubtitle method-title">negate</h3> <div class="method-subsection brief-description"> <p>Negate this vector.</p> </div> <div class="method-subsection method-declaration"><code>- (LeapVector *)negate</code></div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The negation of this LeapVector.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>Negate this vector.</p> <pre><code> LeapVector *negation = thisVector.negate; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/normalized" title="normalized"></a> <h3 class="subsubtitle method-title">normalized</h3> <div class="method-subsection brief-description"> <p>A normalized copy of this vector.</p> </div> <div class="method-subsection method-declaration"><code>- (LeapVector *)normalized</code></div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>A LeapVector object with a length of one, pointing in the same<br/> direction as this Vector object.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>A normalized copy of this vector.</p> <pre><code> LeapVector *normalizedVector = otherVector.normalized; </code></pre> <p>A normalized vector has the same direction as the original vector,<br/> but with a length of one.</p> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/pitch" title="pitch"></a> <h3 class="subsubtitle method-title">pitch</h3> <div class="method-subsection brief-description"> <p>The pitch angle in radians.</p> </div> <div class="method-subsection method-declaration"><code>- (float)pitch</code></div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The angle of this vector above or below the horizon (x-z plane).</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The pitch angle in radians.</p> <pre><code> float pitchInRadians = thisVector.pitch; </code></pre> <p>Pitch is the angle between the negative z-axis and the projection of<br/> the vector onto the y-z plane. In other words, pitch represents rotation<br/> around the x-axis.<br/> If the vector points upward, the returned angle is between 0 and pi radians<br/> (180 degrees); if it points downward, the angle is between 0 and -pi radians.</p> <p><img src="../docs/images/Math_Pitch_Angle.png"/></p> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/plus:" title="plus:"></a> <h3 class="subsubtitle method-title">plus:</h3> <div class="method-subsection brief-description"> <p>Adds two vectors.</p> </div> <div class="method-subsection method-declaration"><code>- (LeapVector *)plus:(const LeapVector *)<em>vector</em></code></div> <div class="method-subsection arguments-section parameters"> <h4 class="method-subtitle parameter-title">Parameters</h4> <dl class="argument-def parameter-def"> <dt><em>vector</em></dt> <dd><p>The LeapVector addend.</p></dd> </dl> </div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The sum of the two LeapVectors.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>Adds two vectors.</p> <pre><code> LeapVector *sum = [thisVector plus:thatVector]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/roll" title="roll"></a> <h3 class="subsubtitle method-title">roll</h3> <div class="method-subsection brief-description"> <p>The roll angle in radians.</p> </div> <div class="method-subsection method-declaration"><code>- (float)roll</code></div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The angle of this vector to the right or left of the y-axis.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The roll angle in radians.</p> <pre><code> float rollInRadians = thatVector.roll; </code></pre> <p>Roll is the angle between the y-axis and the projection of<br/> the vector onto the x-y plane. In other words, roll represents rotation<br/> around the z-axis. If the vector points to the left of the y-axis,<br/> then the returned angle is between 0 and pi radians (180 degrees);<br/> if it points to the right, the angle is between 0 and -pi radians.</p> <p><img src="../docs/images/Math_Roll_Angle.png"/></p> <p>Use this function to get roll angle of the plane to which this vector is a<br/> normal. For example, if this vector represents the normal to the palm,<br/> then this function returns the tilt or roll of the palm plane compared<br/> to the horizontal (x-z) plane.</p> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/times:" title="times:"></a> <h3 class="subsubtitle method-title">times:</h3> <div class="method-subsection brief-description"> <p>Multiply this vector by a number.</p> </div> <div class="method-subsection method-declaration"><code>- (LeapVector *)times:(float)<em>scalar</em></code></div> <div class="method-subsection arguments-section parameters"> <h4 class="method-subtitle parameter-title">Parameters</h4> <dl class="argument-def parameter-def"> <dt><em>scalar</em></dt> <dd><p>The scalar factor.</p></dd> </dl> </div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The product of this LeapVector and a scalar.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>Multiply this vector by a number.</p> <pre><code> LeapVector *product = [thisVector times:5.0]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/toFloatPointer" title="toFloatPointer"></a> <h3 class="subsubtitle method-title">toFloatPointer</h3> <div class="method-subsection brief-description"> <p>Returns an NSMutableData object containing the vector components as<br/> consecutive floating point values.</p> </div> <div class="method-subsection method-declaration"><code>- (NSMutableData *)toFloatPointer</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>Returns an NSMutableData object containing the vector components as<br/> consecutive floating point values.</p> <pre><code> NSData *vectorData = thisVector.toFloatPointer; float x, y, z; [vectorData getBytes:&amp;x length:sizeof(float)]; [vectorData getBytes:&amp;y length:sizeof(float)]; [vectorData getBytes:&amp;z length:sizeof(float)]; //Or access as an array of float: float array[3]; [vectorData getBytes:&amp;array length:sizeof(float) * 3]; x = array[0]; y = array[1]; z = array[2]; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/toNSArray" title="toNSArray"></a> <h3 class="subsubtitle method-title">toNSArray</h3> <div class="method-subsection brief-description"> <p>Returns an NSArray object containing the vector components in the<br/> order: x, y, z.</p> </div> <div class="method-subsection method-declaration"><code>- (NSArray *)toNSArray</code></div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>Returns an NSArray object containing the vector components in the<br/> order: x, y, z.</p> <pre><code> NSArray *vectorArray = thisVector.toNSArray; </code></pre> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> <div class="section-method"> <a name="//api/name/yaw" title="yaw"></a> <h3 class="subsubtitle method-title">yaw</h3> <div class="method-subsection brief-description"> <p>The yaw angle in radians.</p> </div> <div class="method-subsection method-declaration"><code>- (float)yaw</code></div> <div class="method-subsection return"> <h4 class="method-subtitle parameter-title">Return Value</h4> <p>The angle of this vector to the right or left of the negative z-axis.</p> </div> <div class="method-subsection availability"> <h4 class="method-subtitle parameter-title">Availability</h4> <p>Since 1.0</p> </div> <div class="method-subsection discussion-section"> <h4 class="method-subtitle">Discussion</h4> <p>The yaw angle in radians.</p> <pre><code> float yawInRadians = thisVector.yaw; </code></pre> <p>Yaw is the angle between the negative z-axis and the projection of<br/> the vector onto the x-z plane. In other words, yaw represents rotation<br/> around the y-axis. If the vector points to the right of the negative z-axis,<br/> then the returned angle is between 0 and pi radians (180 degrees);<br/> if it points to the left, the angle is between 0 and -pi radians.</p> <p><img src="../docs/images/Math_Yaw_Angle.png"/></p> </div> <div class="method-subsection declared-in-section"> <h4 class="method-subtitle">Declared In</h4> <code class="declared-in-ref">LeapObjectiveC.h</code><br /> </div> </div> </div> </div> <div class="main-navigation navigation-bottom"> <ul> <li><a href="../index.html">Index</a></li> <li><a href="../hierarchy.html">Hierarchy</a></li> </ul> </div> <div id="footer"> <hr /> <div class="footer-copyright"> <p><span class="copyright">&copy; 2013 Leap Motion. All rights reserved. (Last updated: 2013-07-19)</span><br /> <span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 858)</a>.</span></p> </div> </div> </div> </article> <script type="text/javascript"> function jumpToChange() { window.location.hash = this.options[this.selectedIndex].value; } function toggleTOC() { var contents = document.getElementById('contents'); var tocContainer = document.getElementById('tocContainer'); if (this.getAttribute('class') == 'open') { this.setAttribute('class', ''); contents.setAttribute('class', ''); tocContainer.setAttribute('class', ''); window.name = "hideTOC"; } else { this.setAttribute('class', 'open'); contents.setAttribute('class', 'isShowingTOC'); tocContainer.setAttribute('class', 'isShowingTOC'); window.name = ""; } return false; } function toggleTOCEntryChildren(e) { e.stopPropagation(); var currentClass = this.getAttribute('class'); if (currentClass == 'children') { this.setAttribute('class', 'children open'); } else if (currentClass == 'children open') { this.setAttribute('class', 'children'); } return false; } function tocEntryClick(e) { e.stopPropagation(); return true; } function init() { var selectElement = document.getElementById('jumpTo'); selectElement.addEventListener('change', jumpToChange, false); var tocButton = document.getElementById('table_of_contents'); tocButton.addEventListener('click', toggleTOC, false); var taskTreeItem = document.getElementById('task_treeitem'); if (taskTreeItem.getElementsByTagName('li').length > 0) { taskTreeItem.setAttribute('class', 'children'); taskTreeItem.firstChild.setAttribute('class', 'disclosure'); } var tocList = document.getElementById('toc'); var tocEntries = tocList.getElementsByTagName('li'); for (var i = 0; i < tocEntries.length; i++) { tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false); } var tocLinks = tocList.getElementsByTagName('a'); for (var i = 0; i < tocLinks.length; i++) { tocLinks[i].addEventListener('click', tocEntryClick, false); } if (window.name == "hideTOC") { toggleTOC.call(tocButton); } } window.onload = init; // If showing in Xcode, hide the TOC and Header if (navigator.userAgent.match(/xcode/i)) { document.getElementById("contents").className = "hideInXcode" document.getElementById("tocContainer").className = "hideInXcode" document.getElementById("top_header").className = "hideInXcode" } </script> </body> </html>
Java