using namespace System;
using namespace System::Web;
using namespace System::Web::Services;
using namespace System::Text;
namespace HugeInteger
{
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
// performs operations on large integers
[ WebServiceAttribute(
Namespace = "http://www.deitel.com/ch20/HugeInteger",
Description = "A Web service which provides methods that"
" can manipulate large integer values." ) ]
public __gc
class HugeIntegerClass : public System::Web::Services::WebService
{
public:
HugeIntegerClass()
{
InitializeComponent();
number = new int __gc[ MAXIMUM ];
}
protected:
void Dispose(Boolean disposing)
{
if (disposing && components)
{
components->Dispose();
}
__super::Dispose(disposing);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent()
{
}
public:
int number __gc[];
// indexed property that accepts an integer parameter
__property int get_Index( int index )
{
return number[ index ];
}
__property void set_Index( int index, int value )
{
number[ index ] = value;
}
[ WebMethod( Description = "Determines whether the first "
"integer is larger than the second integer." ) ]
bool Bigger( String *first, String *second );
[ WebMethod( Description = "Determines whether the "
"first integer is smaller than the second integer." ) ]
bool Smaller( String *first, String *second );
[ WebMethod( Description = "Determines whether the "
"first integer is equal to the second integer." ) ]
bool EqualTo( String *first, String *second );
private:
static const int MAXIMUM = 100;
void Borrow( HugeIntegerClass *integer, int place );
};
}