Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright The Sett Ltd, 2005 to 2014.
  *
  * 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.thesett.aima.logic.fol.wam.debugger;

RegisterModel describes the register and flag set of some machine, reflectively so tools can be built on top of the register model dynamically.

CRC Card
Responsibilities Collaborations
Describe the register and flag set of some abstract machine.

Author(s):
Rupert Smith
public interface RegisterModel
{
    
Provides a list of all of the registers in the machine.

Returns:
A list of all of the registers in the machine.
    public String[] getRegisterNames();

    
Provides a list of all of the flags in the machine.

Returns:
A list of all of the flags in the machine.
    public String[] getFlagNames();

    
Provides the number of bytes that a register occupies.

Parameters:
name The register to get the size of.
Returns:
The number of bytes that a register occupies.
    public int getRegisterSizeBytes(String name);

    
Provides the contents of a register.

Parameters:
name The register to read.
Returns:
The registers value.
    public byte[] getRegister(String name);

    
Gets the status of a flag.

Parameters:
name The flag to read.
Returns:
The flags name.
    public boolean getFlag(String name);
New to GrepCode? Check out our FAQ X