Exemplo n.º 1
0
 public ResolvedUsingScope(CppTypeResolveContext context, UsingScope usingScope)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (usingScope == null)
     {
         throw new ArgumentNullException("usingScope");
     }
     this.parentContext = context;
     this.usingScope    = usingScope;
     if (usingScope.Parent != null)
     {
         if (context.CurrentUsingScope == null)
         {
             throw new InvalidOperationException();
         }
     }
     else
     {
         if (context.CurrentUsingScope != null)
         {
             throw new InvalidOperationException();
         }
     }
 }
Exemplo n.º 2
0
		/// <summary>
		/// Creates a new nested using scope.
		/// </summary>
		/// <param name="parent">The parent using scope.</param>
		/// <param name="shortName">The short namespace name.</param>
		public UsingScope(UsingScope parent, string shortName)
		{
			if (parent == null)
				throw new ArgumentNullException("parent");
			if (shortName == null)
				throw new ArgumentNullException("shortName");
			this.parent = parent;
			this.shortName = shortName;
		}
Exemplo n.º 3
0
 public CppParsedFile(string fileName)
 {
     if (fileName == null)
     {
         throw new ArgumentNullException("fileName");
     }
     this.fileName       = fileName;
     this.rootUsingScope = new UsingScope();
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates a new nested using scope.
 /// </summary>
 /// <param name="parent">The parent using scope.</param>
 /// <param name="shortName">The short namespace name.</param>
 public UsingScope(UsingScope parent, string shortName)
 {
     if (parent == null)
     {
         throw new ArgumentNullException("parent");
     }
     if (shortName == null)
     {
         throw new ArgumentNullException("shortName");
     }
     this.parent    = parent;
     this.shortName = shortName;
 }
Exemplo n.º 5
0
		public ResolvedUsingScope(CppTypeResolveContext context, UsingScope usingScope)
		{
			if (context == null)
				throw new ArgumentNullException("context");
			if (usingScope == null)
				throw new ArgumentNullException("usingScope");
			this.parentContext = context;
			this.usingScope = usingScope;
			if (usingScope.Parent != null) {
				if (context.CurrentUsingScope == null)
					throw new InvalidOperationException();
			} else {
				if (context.CurrentUsingScope != null)
					throw new InvalidOperationException();
			}
		}
		public CppUnresolvedTypeDefinition(CppUnresolvedTypeDefinition declaringTypeDefinition, string name)
			: base(declaringTypeDefinition, name)
		{
			this.usingScope = declaringTypeDefinition.usingScope;
			this.AddDefaultConstructorIfRequired = true;
		}
		public CppUnresolvedTypeDefinition(UsingScope usingScope, string name)
			: base(usingScope.NamespaceName, name)
		{
			this.usingScope = usingScope;
			this.AddDefaultConstructorIfRequired = true;
		}
 public CppUnresolvedTypeDefinition(CppUnresolvedTypeDefinition declaringTypeDefinition, string name)
     : base(declaringTypeDefinition, name)
 {
     this.usingScope = declaringTypeDefinition.usingScope;
     this.AddDefaultConstructorIfRequired = true;
 }
 public CppUnresolvedTypeDefinition(UsingScope usingScope, string name)
     : base(usingScope.NamespaceName, name)
 {
     this.usingScope = usingScope;
     this.AddDefaultConstructorIfRequired = true;
 }