While working on a scripting engine I Encountered the following problem.
First I Created an abstract base class EPType that represent a variable type in the script.
second I Add the two following classes
the problem is that i want EPValueType to be "seen" outside the current assembly so that anyone using this engine will be able to inherit from it and add new types, but I dont want it's base class EPType to be seen since there are only two categories of types, reference type and value type.But if I set EPType as an internal class and EPValueType as a public class i get an Inconsistent accessibility error. is there a way to do what i want without changing the entire design of the scripting engine?
hope I was clear...i got the the feeling that i wasn't :X
thanks in advance
First I Created an abstract base class EPType that represent a variable type in the script.
Code:
internal abstract class EPType
{
private String m_Name;
public String Name
{
get { return m_Name; }
}
public EPType(String Name)
{
m_Name = Name;
}
public abstract Object ParseValue(String str);
}
Code:
public abstract class EPValueType : EPType
{
private EPReferenceType m_RefType;
public EPValueType(String strName)
: base(strName)
{
m_RefType = new EPRefernceType(strName + "Ref", this);
}
internal EPReferenceType ReferenceType
{
get { return m_RefType; }
}
}
internal class EPReferenceType : EPType
{
private EPValueType m_Type;
public EPReferenceType(String strName, EPValueType vType)
: base(strName)
{
m_Type = vType;
}
public EPValueType Type
{
get { return m_Type; }
}
public override object ParseValue(string str)
{
return str;
}
}
hope I was clear...i got the the feeling that i wasn't :X
thanks in advance
Comment