I'm confuse of what your trying to do. I don't see the "static" mimic at all in what your trying to do.
posibility that I understand:
#1
if you think you have to call FooBar.Get() or FooBar.Set() is because you do not understand methodmaps properties.
You have to use FooBar.Value = 1 and FooBar.Value it just you have to declare inside your methodmap what will happen getter/setter.
PHP Code:
int g_iGlobalMimicStaticHolder;
methodmap FooBar
{
property int Value
{
public set(int value) { g_iGlobalMimicStaticHolder = value };
public get() { return g_iGlobalMimicStaticHolder; }
}
}
Some where in code:
FooBar foo;
foo.Value = 2;
FooBar myNewFoo;
if (foo.Value == myNewFoo.Value)
PrintToServer("it work!");
#2
If you want to save value per instance of object then you have to store it some where. Example of unlimited storage:
PHP Code:
ArrayList g_MyValue;
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int error_length)
{
g_MyValue = new ArrayList(1);
/* if use natives put it there */
return APLRes_Success;
}
methodmap FooBar
{
public FooBar()
{
return view_as<FooBar>g_MyValue.Push(0/* default variable value here */);
}
property int Index
{
public get() { return view_as<int>this; } // array index
}
property int Value
{
public set(int value) { g_MyValue.Set(view_as<int>this, value); }
public get() { return g_MyValue.Get(view_as<int>this); }
}
}
You can also declare your methodmaps function as native if you want to share w.e. memory with other plugins
property int Value
{
public native set();
...
inside AskPluginLoad2
CreateNative("FooBar.Value.set", Native_SetFooBarValue);
...
well that pretty much it
Edit: none of the above has been really tested but the logic should be right and the examples prob work just don't be suprise if I mistype a var or w.e.