org.eclipse.cdt.core
Interface IAddressFactory


public interface IAddressFactory

This inteface serves as an address factory. If you need to implement your own addresses, you should extend this. Please see Addr32Factory and Addr64Factory to see how it can be implemented.


Method Summary
 IAddress createAddress(java.math.BigInteger addr)
          Create address from a BigInteger
 IAddress createAddress(java.lang.String addr)
          Creates address from string representation. 1.
 IAddress createAddress(java.lang.String addr, int radix)
          Creates address from string with given radix.
 IAddress getMax()
          Returns maximal address.
 IAddress getZero()
          Returns zero address, i.e. minimal possible address
 

Method Detail

getZero

IAddress getZero()
Returns zero address, i.e. minimal possible address

Returns:

getMax

IAddress getMax()
Returns maximal address.

Returns:

createAddress

IAddress createAddress(java.lang.String addr)
Creates address from string representation. 1. Method should be able to create address from hex address string (string produced with IAddress.toHexAddressString() method). 2. Method should be case insensetive 3. Method should be able to create address from decimal address representation 4. Method should throw NumberFormatException if the given string cannot be decoded. 5. Method should not attempt to evaluate string as expression (i.e., "0x1000 + 5" should not result in an IAddress for 0x1005.) Input must be a straightforward, absolute value. Please see Addr32Factory.createAddress() for reference implementation.

Parameters:
addr -
Returns:

createAddress

IAddress createAddress(java.lang.String addr,
                       int radix)
Creates address from string with given radix. Given string should not contain any prefixes or sign numbers. Method should be case insensetive Method should throw NumberFormatException if the given string cannot be decoded. Method should not attempt to evaluate string as expression (i.e., "1000 + 5" should not result in an IAddress for 1005.) Input must be a straightforward, absolute value.

Parameters:
addr -
radix -
Returns:

createAddress

IAddress createAddress(java.math.BigInteger addr)
Create address from a BigInteger

Parameters:
addr -
Returns: