nestopia/doc/details/api/Nes..Api..DipSwitches.html
2012-09-02 13:13:55 -04:00

352 lines
10 KiB
HTML

<HTML>
<HEAD>
<!-- Generated by CppDoc v2.4.1 on June 07, 2008 at 22:48-->
<META NAME="GENERATOR" Content="CppDoc">
<TITLE>Nestopia Core API: Nes::Api::DipSwitches</TITLE>
</HEAD>
<BODY>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#eeeeff">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#eeeeff"> &nbsp;<a href="../../index-overview-summary.html"><B>Overview</B></a>&nbsp;</TD>
<TD BGCOLOR="#eeeeff"> &nbsp;<a href="project-summary.html"><B>Project</B></a>&nbsp;</TD>
<TD BGCOLOR="navy"> <FONT COLOR="white">&nbsp;<B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#eeeeff"> &nbsp;<a href="project-tree.html"><B>Tree</B></a>&nbsp;</TD>
<TD BGCOLOR="#eeeeff"> &nbsp;<a href="../../index-deprecated-list.html"><B>Deprecated</B></a>&nbsp;</TD>
<TD BGCOLOR="#eeeeff"> &nbsp;<a href="../../index-all.html"><B>Index</B></a>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>Nestopia Core API</B></EM>
</TD>
</TR>
<TR>
<TD><FONT SIZE="-2">
<a href="../../index.html" target="_top"><B>FRAMES</B></a> &nbsp;
&nbsp;<a href="../api/Nes..Api..DipSwitches.html" target="_top"><B>NO FRAMES</B></a></FONT></TD>
</TR>
<TR>
<TD VALIGN="top"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
api</FONT>
<BR>
Class Nes::Api::DipSwitches</H2>
<PRE>
<code>Base</code>
|
+--<B>Nes::Api::DipSwitches</B>
</PRE>
<HR>
<DL>
<DT>class <B><a href="../api/Nes..Api.html">Nes::Api</a>::DipSwitches</B></DT><dt> extends Base
</DL>
<p>DIP switches interface.
<p>
<HR>
<!-- =========== CONSTRUCTOR SUMMARY =========== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD><CODE><B><a href="#DipSwitches(T&)">DipSwitches</a></B>( T& instance )</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interface constructor.</TD>
</TR>
</TABLE>
&nbsp;
<!-- =========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;bool</CODE></FONT></TD>
<TD><CODE><B><a href="#CanModify()">CanModify</a></B>() const</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the DIP switches can be changed at this time.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;const char*</CODE></FONT></TD>
<TD><CODE><B><a href="#GetDipName(uint)">GetDipName</a></B>( uint dip ) const</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of a DIP switch.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><a href="#GetValue(uint)">GetValue</a></B>( uint dip ) const</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current DIP switch value.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;const char*</CODE></FONT></TD>
<TD><CODE><B><a href="#GetValueName(uint,uint)">GetValueName</a></B>( uint dip, uint value ) const</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of a DIP switch value.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;uint</CODE></FONT></TD>
<TD><CODE><B><a href="#NumDips()">NumDips</a></B>() const</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of available DIP switches.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;uint</CODE></FONT></TD>
<TD><CODE><B><a href="#NumValues(uint)">NumValues</a></B>( uint dip ) const</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of values that can be chosen for a DIP switch.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#SetValue(uint,uint)">SetValue</a></B>( uint dip, uint value )</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a DIP switch value.</TD>
</TR>
</TABLE>
&nbsp;
<BR>
<BR>
<!-- ============ Constructor Detail ========== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="DipSwitches(T&)"><!-- --></A>
<A NAME="DipSwitches"><!-- --></A>
<H3>DipSwitches</H3>
<PRE>
public <B>DipSwitches</B>( T& instance );
</PRE>
<DL>
<DD>Interface constructor.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>instance</code> - emulator instance</DD>
</DL>
</DL>
<HR>
<BR>
<!-- ============ Method Detail ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="CanModify()"><!-- --></A>
<A NAME="CanModify"><!-- --></A>
<H3>CanModify</H3>
<PRE>
public bool <B>CanModify</B>() const throw();
</PRE>
<DL>
<DD>Checks if the DIP switches can be changed at this time.
</DD>
<DL>
<DT><B>Returns: </B><DD>true if DIP switches can be changed</DD>
</DL>
</DL>
<HR>
<A NAME="GetDipName(uint)"><!-- --></A>
<A NAME="GetDipName"><!-- --></A>
<H3>GetDipName</H3>
<PRE>
public const char* <B>GetDipName</B>( uint dip ) const throw();
</PRE>
<DL>
<DD>Returns the name of a DIP switch.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>dip</code> - DIP switch ID</DD>
<DT><B>Returns: </B><DD>DIP switch name or NULL if unavailable</DD>
</DL>
</DL>
<HR>
<A NAME="GetValue(uint)"><!-- --></A>
<A NAME="GetValue"><!-- --></A>
<H3>GetValue</H3>
<PRE>
public int <B>GetValue</B>( uint dip ) const throw();
</PRE>
<DL>
<DD>Returns the current DIP switch value.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>dip</code> - DIP switch ID</DD>
<DT><B>Returns: </B><DD>value ID or INVALID if unavailable</DD>
</DL>
</DL>
<HR>
<A NAME="GetValueName(uint,uint)"><!-- --></A>
<A NAME="GetValueName"><!-- --></A>
<H3>GetValueName</H3>
<PRE>
public const char* <B>GetValueName</B>( uint dip, uint value ) const throw();
</PRE>
<DL>
<DD>Returns the name of a DIP switch value.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>dip</code> - DIP switch ID
<DD><code>value</code> - value ID</DD>
<DT><B>Returns: </B><DD>value name or NULL if unavailable</DD>
</DL>
</DL>
<HR>
<A NAME="NumDips()"><!-- --></A>
<A NAME="NumDips"><!-- --></A>
<H3>NumDips</H3>
<PRE>
public uint <B>NumDips</B>() const throw();
</PRE>
<DL>
<DD>Returns the number of available DIP switches.
</DD>
<DL>
<DT><B>Returns: </B><DD>number</DD>
</DL>
</DL>
<HR>
<A NAME="NumValues(uint)"><!-- --></A>
<A NAME="NumValues"><!-- --></A>
<H3>NumValues</H3>
<PRE>
public uint <B>NumValues</B>( uint dip ) const throw();
</PRE>
<DL>
<DD>Returns the number of values that can be chosen for a DIP switch.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>dip</code> - DIP switch ID</DD>
<DT><B>Returns: </B><DD>number</DD>
</DL>
</DL>
<HR>
<A NAME="SetValue(uint,uint)"><!-- --></A>
<A NAME="SetValue"><!-- --></A>
<H3>SetValue</H3>
<PRE>
public Result <B>SetValue</B>( uint dip, uint value ) throw();
</PRE>
<DL>
<DD>Sets a DIP switch value.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>dip</code> - DIP switch ID
<DD><code>value</code> - value ID</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>
</DL>
<HR>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#eeeeff">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#eeeeff"> &nbsp;<a href="../../index-overview-summary.html"><B>Overview</B></a>&nbsp;</TD>
<TD BGCOLOR="#eeeeff"> &nbsp;<a href="project-summary.html"><B>Project</B></a>&nbsp;</TD>
<TD BGCOLOR="navy"> <FONT COLOR="white">&nbsp;<B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#eeeeff"> &nbsp;<a href="project-tree.html"><B>Tree</B></a>&nbsp;</TD>
<TD BGCOLOR="#eeeeff"> &nbsp;<a href="../../index-deprecated-list.html"><B>Deprecated</B></a>&nbsp;</TD>
<TD BGCOLOR="#eeeeff"> &nbsp;<a href="../../index-all.html"><B>Index</B></a>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>Nestopia Core API</B></EM>
</TD>
</TR>
<TR>
<TD><FONT SIZE="-2">
<a href="../../index.html" target="_top"><B>FRAMES</B></a> &nbsp;
&nbsp;<a href="../api/Nes..Api..DipSwitches.html" target="_top"><B>NO FRAMES</B></a></FONT></TD>
</TR>
<TR>
<TD VALIGN="top"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>