ObjFW  Diff

Differences From Artifact [c2ce5ebc7f]:

To Artifact [7698b64d75]:


1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591

	return string;
}
@end

@implementation OFUnboundNamespaceException
+ newWithClass: (Class)class_
     namespace: (OFString*)namespace
{
	return [[self alloc] initWithClass: class_
				 namespace: namespace];
}

+ newWithClass: (Class)class_
	prefix: (OFString*)prefix
{
	return [[self alloc] initWithClass: class_
				    prefix: prefix];
}

- initWithClass: (Class)class_
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- initWithClass: (Class)class_
      namespace: (OFString*)namespace_
{
	self = [super initWithClass: class_];

	namespace = [namespace_ copy];

	return self;
}

- initWithClass: (Class)class_
	 prefix: (OFString*)prefix_
{
	self = [super initWithClass: class_];

	prefix = [prefix_ copy];

	return self;
}

- (void)dealloc
{
	[namespace release];
	[prefix release];

	[super dealloc];
}

- (OFString*)string
{
	if (string != nil)
		return string;

	if (namespace != nil)
		string = [[OFString alloc] initWithFormat:
		    @"The namespace %s is not bound in class %s",
		    [inClass className]];
	else if (prefix != nil)
		string = [[OFString alloc] initWithFormat:
		    @"The prefix %s is not bound to any namespace in %s",
		    [inClass className]];

	return string;
}

- (OFString*)namespace
{
	return namespace;
}

- (OFString*)prefix
{
	return prefix;
}
@end







|


|
















|



|
















|










|













|







1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591

	return string;
}
@end

@implementation OFUnboundNamespaceException
+ newWithClass: (Class)class_
     namespace: (OFString*)ns
{
	return [[self alloc] initWithClass: class_
				 namespace: ns];
}

+ newWithClass: (Class)class_
	prefix: (OFString*)prefix
{
	return [[self alloc] initWithClass: class_
				    prefix: prefix];
}

- initWithClass: (Class)class_
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- initWithClass: (Class)class_
      namespace: (OFString*)ns_
{
	self = [super initWithClass: class_];

	ns = [ns_ copy];

	return self;
}

- initWithClass: (Class)class_
	 prefix: (OFString*)prefix_
{
	self = [super initWithClass: class_];

	prefix = [prefix_ copy];

	return self;
}

- (void)dealloc
{
	[ns release];
	[prefix release];

	[super dealloc];
}

- (OFString*)string
{
	if (string != nil)
		return string;

	if (ns != nil)
		string = [[OFString alloc] initWithFormat:
		    @"The namespace %s is not bound in class %s",
		    [inClass className]];
	else if (prefix != nil)
		string = [[OFString alloc] initWithFormat:
		    @"The prefix %s is not bound to any namespace in %s",
		    [inClass className]];

	return string;
}

- (OFString*)namespace
{
	return ns;
}

- (OFString*)prefix
{
	return prefix;
}
@end