Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d4810a81
Kaydet (Commit)
d4810a81
authored
Tem 10, 2014
tarafından
Norbert Thiebaud
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cosmetic 'en-passant'....
Change-Id: I9a787065898004ece4bd55839c563b7395e3a314
üst
7f554464
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
746 additions
and
696 deletions
+746
-696
unoidl-check.cxx
unoidl/source/unoidl-check.cxx
+746
-696
No files found.
unoidl/source/unoidl-check.cxx
Dosyayı görüntüle @
d4810a81
...
@@ -27,9 +27,12 @@
...
@@ -27,9 +27,12 @@
namespace
unoidl
{
namespace
unoidl
{
bool
operator
==
(
ConstantValue
const
&
lhs
,
ConstantValue
const
&
rhs
)
{
bool
operator
==
(
ConstantValue
const
&
lhs
,
ConstantValue
const
&
rhs
)
if
(
lhs
.
type
==
rhs
.
type
)
{
{
switch
(
lhs
.
type
)
{
if
(
lhs
.
type
==
rhs
.
type
)
{
switch
(
lhs
.
type
)
{
case
ConstantValue
:
:
TYPE_BOOLEAN
:
case
ConstantValue
:
:
TYPE_BOOLEAN
:
return
lhs
.
booleanValue
==
rhs
.
booleanValue
;
return
lhs
.
booleanValue
==
rhs
.
booleanValue
;
case
ConstantValue
:
:
TYPE_BYTE
:
case
ConstantValue
:
:
TYPE_BYTE
:
...
@@ -55,13 +58,13 @@ bool operator ==(ConstantValue const & lhs, ConstantValue const & rhs) {
...
@@ -55,13 +58,13 @@ bool operator ==(ConstantValue const & lhs, ConstantValue const & rhs) {
return
false
;
return
false
;
}
}
bool
operator
!=
(
ConstantValue
const
&
lhs
,
ConstantValue
const
&
rhs
)
{
bool
operator
!=
(
ConstantValue
const
&
lhs
,
ConstantValue
const
&
rhs
)
{
return
!
(
lhs
==
rhs
);
return
!
(
lhs
==
rhs
);
}
}
bool
operator
==
(
bool
operator
==
(
SingleInterfaceBasedServiceEntity
::
Constructor
::
Parameter
const
&
lhs
,
SingleInterfaceBasedServiceEntity
::
Constructor
::
Parameter
const
&
lhs
,
SingleInterfaceBasedServiceEntity
::
Constructor
::
Parameter
const
&
rhs
)
SingleInterfaceBasedServiceEntity
::
Constructor
::
Parameter
const
&
rhs
)
{
{
return
lhs
.
name
==
rhs
.
name
&&
lhs
.
type
==
rhs
.
type
&&
lhs
.
rest
==
rhs
.
rest
;
return
lhs
.
name
==
rhs
.
name
&&
lhs
.
type
==
rhs
.
type
&&
lhs
.
rest
==
rhs
.
rest
;
}
}
...
@@ -70,12 +73,18 @@ bool operator ==(
...
@@ -70,12 +73,18 @@ bool operator ==(
namespace
{
namespace
{
void
badUsage
()
{
void
badUsage
()
{
std
::
cerr
std
::
cerr
<<
"Usage:"
<<
std
::
endl
<<
std
::
endl
<<
"Usage:"
<<
std
::
endl
<<
std
::
endl
<<
(
" unoidl-check [<extra registries A>] <registry A> -- [<extra"
<<
(
" unoidl-check [<extra registries A>] <registry A> -- [<extra"
" registries B>]"
)
" registries B>]"
)
<<
std
::
endl
<<
" <registry B>"
<<
std
::
endl
<<
std
::
endl
<<
std
::
endl
<<
" <registry B>"
<<
std
::
endl
<<
std
::
endl
<<
(
"where each <registry> is either a new- or legacy-format .rdb file,"
<<
(
"where each <registry> is either a new- or legacy-format .rdb file,"
" a single .idl"
)
" a single .idl"
)
<<
std
::
endl
<<
std
::
endl
...
@@ -87,11 +96,14 @@ void badUsage() {
...
@@ -87,11 +96,14 @@ void badUsage() {
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
OUString
getArgumentUri
(
sal_uInt32
argument
,
bool
*
delimiter
)
{
OUString
getArgumentUri
(
sal_uInt32
argument
,
bool
*
delimiter
)
{
OUString
arg
;
OUString
arg
;
rtl_getAppCommandArg
(
argument
,
&
arg
.
pData
);
rtl_getAppCommandArg
(
argument
,
&
arg
.
pData
);
if
(
arg
==
"--"
)
{
if
(
arg
==
"--"
)
if
(
delimiter
==
0
)
{
{
if
(
delimiter
==
0
)
{
badUsage
();
badUsage
();
}
}
*
delimiter
=
true
;
*
delimiter
=
true
;
...
@@ -99,15 +111,18 @@ OUString getArgumentUri(sal_uInt32 argument, bool * delimiter) {
...
@@ -99,15 +111,18 @@ OUString getArgumentUri(sal_uInt32 argument, bool * delimiter) {
}
}
OUString
url
;
OUString
url
;
osl
::
FileBase
::
RC
e1
=
osl
::
FileBase
::
getFileURLFromSystemPath
(
arg
,
url
);
osl
::
FileBase
::
RC
e1
=
osl
::
FileBase
::
getFileURLFromSystemPath
(
arg
,
url
);
if
(
e1
!=
osl
::
FileBase
::
E_None
)
{
if
(
e1
!=
osl
::
FileBase
::
E_None
)
{
std
::
cerr
std
::
cerr
<<
"Cannot convert
\"
"
<<
arg
<<
"
\"
to file URL, error code "
<<
"Cannot convert
\"
"
<<
arg
<<
"
\"
to file URL, error code "
<<
+
e1
<<
std
::
endl
;
<<
+
e1
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
OUString
cwd
;
OUString
cwd
;
oslProcessError
e2
=
osl_getProcessWorkingDir
(
&
cwd
.
pData
);
oslProcessError
e2
=
osl_getProcessWorkingDir
(
&
cwd
.
pData
);
if
(
e2
!=
osl_Process_E_None
)
{
if
(
e2
!=
osl_Process_E_None
)
{
std
::
cerr
std
::
cerr
<<
"Cannot obtain working directory, error code "
<<
+
e2
<<
"Cannot obtain working directory, error code "
<<
+
e2
<<
std
::
endl
;
<<
std
::
endl
;
...
@@ -115,19 +130,21 @@ OUString getArgumentUri(sal_uInt32 argument, bool * delimiter) {
...
@@ -115,19 +130,21 @@ OUString getArgumentUri(sal_uInt32 argument, bool * delimiter) {
}
}
OUString
abs
;
OUString
abs
;
e1
=
osl
::
FileBase
::
getAbsoluteFileURL
(
cwd
,
url
,
abs
);
e1
=
osl
::
FileBase
::
getAbsoluteFileURL
(
cwd
,
url
,
abs
);
if
(
e1
!=
osl
::
FileBase
::
E_None
)
{
if
(
e1
!=
osl
::
FileBase
::
E_None
)
{
std
::
cerr
std
::
cerr
<<
"Cannot make
\"
"
<<
url
<<
"Cannot make
\"
"
<<
url
<<
"
\"
into an absolute file URL, error code "
<<
+
e1
<<
std
::
endl
;
<<
"
\"
into an absolute file URL, error code "
<<
+
e1
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
return
abs
;
return
abs
;
}
}
OUString
showDirection
(
OUString
showDirection
(
unoidl
::
InterfaceTypeEntity
::
Method
::
Parameter
::
Direction
direction
)
unoidl
::
InterfaceTypeEntity
::
Method
::
Parameter
::
Direction
direction
)
{
{
switch
(
direction
)
{
switch
(
direction
)
{
case
unoidl
:
:
InterfaceTypeEntity
::
Method
::
Parameter
::
DIRECTION_IN
:
case
unoidl
:
:
InterfaceTypeEntity
::
Method
::
Parameter
::
DIRECTION_IN
:
return
OUString
(
"[in]"
);
return
OUString
(
"[in]"
);
case
unoidl
:
:
InterfaceTypeEntity
::
Method
::
Parameter
::
DIRECTION_OUT
:
case
unoidl
:
:
InterfaceTypeEntity
::
Method
::
Parameter
::
DIRECTION_OUT
:
...
@@ -139,824 +156,828 @@ OUString showDirection(
...
@@ -139,824 +156,828 @@ OUString showDirection(
}
}
}
}
struct
EqualsAnnotation
{
struct
EqualsAnnotation
{
EqualsAnnotation
(
OUString
const
&
name
)
:
name_
(
name
)
{}
EqualsAnnotation
(
OUString
const
&
name
)
:
name_
(
name
)
{}
bool
operator
()(
unoidl
::
AnnotatedReference
const
&
ref
)
bool
operator
()(
unoidl
::
AnnotatedReference
const
&
ref
)
{
return
ref
.
name
==
name_
;
}
{
return
ref
.
name
==
name_
;
}
private
:
private
:
OUString
name_
;
OUString
name_
;
};
};
void
checkMap
(
void
checkMap
(
rtl
::
Reference
<
unoidl
::
Provider
>
const
&
providerB
,
OUString
const
&
prefix
,
rtl
::
Reference
<
unoidl
::
Provider
>
const
&
providerB
,
OUString
const
&
prefix
,
rtl
::
Reference
<
unoidl
::
MapCursor
>
const
&
cursor
)
rtl
::
Reference
<
unoidl
::
MapCursor
>
const
&
cursor
)
{
{
assert
(
providerB
.
is
());
assert
(
providerB
.
is
());
assert
(
cursor
.
is
());
assert
(
cursor
.
is
());
for
(;;)
{
for
(;;)
{
OUString
id
;
OUString
id
;
rtl
::
Reference
<
unoidl
::
Entity
>
entA
(
cursor
->
getNext
(
&
id
));
rtl
::
Reference
<
unoidl
::
Entity
>
entA
(
cursor
->
getNext
(
&
id
));
if
(
!
entA
.
is
())
{
if
(
!
entA
.
is
())
{
break
;
break
;
}
}
OUString
name
(
prefix
+
id
);
OUString
name
(
prefix
+
id
);
if
(
entA
->
getSort
()
==
unoidl
::
Entity
::
SORT_MODULE
)
{
if
(
entA
->
getSort
()
==
unoidl
::
Entity
::
SORT_MODULE
)
checkMap
(
{
providerB
,
name
+
"."
,
checkMap
(
providerB
,
name
+
"."
,
(
static_cast
<
unoidl
::
ModuleEntity
*>
(
entA
.
get
())
(
static_cast
<
unoidl
::
ModuleEntity
*>
(
entA
.
get
())
->
createCursor
()));
->
createCursor
()));
}
}
else
{
else
{
rtl
::
Reference
<
unoidl
::
Entity
>
entB
(
providerB
->
findEntity
(
name
));
rtl
::
Reference
<
unoidl
::
Entity
>
entB
(
providerB
->
findEntity
(
name
));
if
(
!
entB
.
is
())
{
if
(
!
entB
.
is
())
{
std
::
cerr
std
::
cerr
<<
"A entity "
<<
name
<<
" is not present in B"
<<
"A entity "
<<
name
<<
" is not present in B"
<<
std
::
endl
;
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
if
(
entA
->
getSort
()
!=
entB
->
getSort
())
{
if
(
entA
->
getSort
()
!=
entB
->
getSort
())
{
std
::
cerr
std
::
cerr
<<
"A entity "
<<
name
<<
" is of different sort in B"
<<
"A entity "
<<
name
<<
" is of different sort in B"
<<
std
::
endl
;
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
if
((
dynamic_cast
<
unoidl
::
PublishableEntity
*>
(
entA
.
get
())
if
((
dynamic_cast
<
unoidl
::
PublishableEntity
*>
(
entA
.
get
())
->
isPublished
())
&&
->
isPublished
())
(
!
dynamic_cast
<
unoidl
::
PublishableEntity
*>
(
entB
.
get
())
->
isPublished
()))
&&
(
!
dynamic_cast
<
unoidl
::
PublishableEntity
*>
(
entB
.
get
())
->
isPublished
()))
{
{
std
::
cerr
std
::
cerr
<<
"A published entity "
<<
name
<<
" is not published in B"
<<
"A published entity "
<<
name
<<
" is not published in B"
<<
std
::
endl
;
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
switch
(
entA
->
getSort
())
{
switch
(
entA
->
getSort
())
{
case
unoidl
:
:
Entity
::
SORT_MODULE
:
case
unoidl
:
:
Entity
::
SORT_MODULE
:
assert
(
false
&&
"this cannot happen"
);
assert
(
false
&&
"this cannot happen"
);
//deliberate fall-through anyway
//deliberate fall-through anyway
case
unoidl
:
:
Entity
::
SORT_ENUM_TYPE
:
case
unoidl
:
:
Entity
::
SORT_ENUM_TYPE
:
{
{
rtl
::
Reference
<
unoidl
::
EnumTypeEntity
>
ent2A
(
rtl
::
Reference
<
unoidl
::
EnumTypeEntity
>
ent2A
(
static_cast
<
unoidl
::
EnumTypeEntity
*>
(
entA
.
get
()));
static_cast
<
unoidl
::
EnumTypeEntity
*>
(
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
EnumTypeEntity
>
ent2B
(
rtl
::
Reference
<
unoidl
::
EnumTypeEntity
>
ent2B
(
static_cast
<
unoidl
::
EnumTypeEntity
*>
(
entB
.
get
()));
static_cast
<
unoidl
::
EnumTypeEntity
*>
(
entB
.
get
()));
if
(
ent2A
->
getMembers
().
size
()
!=
ent2B
->
getMembers
().
size
())
if
(
ent2A
->
getMembers
().
size
()
!=
ent2B
->
getMembers
().
size
())
{
std
::
cerr
<<
"enum type "
<<
name
<<
" number of members changed from "
<<
ent2A
->
getMembers
().
size
()
<<
" to "
<<
ent2B
->
getMembers
().
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
for
(
std
::
vector
<
unoidl
::
EnumTypeEntity
::
Member
>::
const_iterator
i
(
ent2A
->
getMembers
().
begin
()),
j
(
ent2B
->
getMembers
().
begin
());
i
!=
ent2A
->
getMembers
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
||
i
->
value
!=
j
->
value
)
{
{
std
::
cerr
std
::
cerr
<<
"enum type "
<<
name
<<
"enum type "
<<
name
<<
" member #"
<<
" number of members changed from "
<<
i
-
ent2A
->
getMembers
().
begin
()
+
1
<<
ent2A
->
getMembers
().
size
()
<<
" to "
<<
" changed from "
<<
i
->
name
<<
" = "
<<
ent2B
->
getMembers
().
size
()
<<
std
::
endl
;
<<
i
->
value
<<
" to "
<<
j
->
name
<<
" = "
<<
j
->
value
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
EnumTypeEntity
::
Member
>::
const_iterator
i
(
ent2A
->
getMembers
().
begin
()),
j
(
ent2B
->
getMembers
().
begin
());
i
!=
ent2A
->
getMembers
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
||
i
->
value
!=
j
->
value
)
{
std
::
cerr
<<
"enum type "
<<
name
<<
" member #"
<<
i
-
ent2A
->
getMembers
().
begin
()
+
1
<<
" changed from "
<<
i
->
name
<<
" = "
<<
i
->
value
<<
" to "
<<
j
->
name
<<
" = "
<<
j
->
value
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
break
;
}
}
break
;
}
case
unoidl
:
:
Entity
::
SORT_PLAIN_STRUCT_TYPE
:
case
unoidl
:
:
Entity
::
SORT_PLAIN_STRUCT_TYPE
:
{
rtl
::
Reference
<
unoidl
::
PlainStructTypeEntity
>
ent2A
(
static_cast
<
unoidl
::
PlainStructTypeEntity
*>
(
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
PlainStructTypeEntity
>
ent2B
(
static_cast
<
unoidl
::
PlainStructTypeEntity
*>
(
entB
.
get
()));
if
(
ent2A
->
getDirectBase
()
!=
ent2B
->
getDirectBase
())
{
{
rtl
::
Reference
<
unoidl
::
PlainStructTypeEntity
>
ent2A
(
std
::
cerr
static_cast
<
unoidl
::
PlainStructTypeEntity
*>
(
<<
"plain struct type "
<<
name
entA
.
get
()));
<<
" direct base changed from "
rtl
::
Reference
<
unoidl
::
PlainStructTypeEntity
>
ent2B
(
<<
(
ent2A
->
getDirectBase
().
isEmpty
()
?
OUString
(
"none"
)
:
ent2A
->
getDirectBase
())
static_cast
<
unoidl
::
PlainStructTypeEntity
*>
(
<<
" to "
entB
.
get
()));
<<
(
ent2B
->
getDirectBase
().
isEmpty
()
?
OUString
(
"none"
)
:
ent2B
->
getDirectBase
())
if
(
ent2A
->
getDirectBase
()
!=
ent2B
->
getDirectBase
())
{
<<
std
::
endl
;
std
::
cerr
std
::
exit
(
EXIT_FAILURE
);
<<
"plain struct type "
<<
name
}
<<
" direct base changed from "
if
(
ent2A
->
getDirectMembers
().
size
()
<<
(
ent2A
->
getDirectBase
().
isEmpty
()
!=
ent2B
->
getDirectMembers
().
size
())
?
OUString
(
"none"
)
:
ent2A
->
getDirectBase
())
{
<<
" to "
std
::
cerr
<<
(
ent2B
->
getDirectBase
().
isEmpty
()
<<
"plain struct type "
<<
name
?
OUString
(
"none"
)
:
ent2B
->
getDirectBase
())
<<
" number of direct members changed from "
<<
std
::
endl
;
<<
ent2A
->
getDirectMembers
().
size
()
<<
" to "
std
::
exit
(
EXIT_FAILURE
);
<<
ent2B
->
getDirectMembers
().
size
()
<<
std
::
endl
;
}
std
::
exit
(
EXIT_FAILURE
);
if
(
ent2A
->
getDirectMembers
().
size
()
}
!=
ent2B
->
getDirectMembers
().
size
())
for
(
std
::
vector
<
unoidl
::
PlainStructTypeEntity
::
Member
>::
const_iterator
i
(
ent2A
->
getDirectMembers
().
begin
()),
j
(
ent2B
->
getDirectMembers
().
begin
());
i
!=
ent2A
->
getDirectMembers
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
||
i
->
type
!=
j
->
type
)
{
{
std
::
cerr
std
::
cerr
<<
"plain struct type "
<<
name
<<
"plain struct type "
<<
name
<<
" number of direct members changed from "
<<
" direct member #"
<<
ent2A
->
getDirectMembers
().
size
()
<<
" to "
<<
i
-
ent2A
->
getDirectMembers
().
begin
()
+
1
<<
ent2B
->
getDirectMembers
().
size
()
<<
std
::
endl
;
<<
" changed from "
<<
i
->
type
<<
" "
<<
i
->
name
<<
" to "
<<
j
->
type
<<
" "
<<
j
->
name
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
PlainStructTypeEntity
::
Member
>::
const_iterator
i
(
ent2A
->
getDirectMembers
().
begin
()),
j
(
ent2B
->
getDirectMembers
().
begin
());
i
!=
ent2A
->
getDirectMembers
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
||
i
->
type
!=
j
->
type
)
{
std
::
cerr
<<
"plain struct type "
<<
name
<<
" direct member #"
<<
i
-
ent2A
->
getDirectMembers
().
begin
()
+
1
<<
" changed from "
<<
i
->
type
<<
" "
<<
i
->
name
<<
" to "
<<
j
->
type
<<
" "
<<
j
->
name
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
break
;
}
}
break
;
}
case
unoidl
:
:
Entity
::
SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE
:
case
unoidl
:
:
Entity
::
SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE
:
{
rtl
::
Reference
<
unoidl
::
PolymorphicStructTypeTemplateEntity
>
ent2A
(
static_cast
<
unoidl
::
PolymorphicStructTypeTemplateEntity
*>
(
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
PolymorphicStructTypeTemplateEntity
>
ent2B
(
static_cast
<
unoidl
::
PolymorphicStructTypeTemplateEntity
*>
(
entB
.
get
()));
if
(
ent2A
->
getTypeParameters
().
size
()
!=
ent2B
->
getTypeParameters
().
size
())
{
std
::
cerr
<<
"polymorphic struct type template "
<<
name
<<
" number of type parameters changed from "
<<
ent2A
->
getTypeParameters
().
size
()
<<
" to "
<<
ent2B
->
getTypeParameters
().
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
for
(
std
::
vector
<
OUString
>::
const_iterator
i
(
ent2A
->
getTypeParameters
().
begin
()),
j
(
ent2B
->
getTypeParameters
().
begin
());
i
!=
ent2A
->
getTypeParameters
().
end
();
++
i
,
++
j
)
{
{
rtl
::
Reference
<
unoidl
::
PolymorphicStructTypeTemplateEntity
>
if
(
*
i
!=
*
j
)
ent2A
(
static_cast
<
unoidl
::
PolymorphicStructTypeTemplateEntity
*>
(
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
PolymorphicStructTypeTemplateEntity
>
ent2B
(
static_cast
<
unoidl
::
PolymorphicStructTypeTemplateEntity
*>
(
entB
.
get
()));
if
(
ent2A
->
getTypeParameters
().
size
()
!=
ent2B
->
getTypeParameters
().
size
())
{
{
std
::
cerr
std
::
cerr
<<
"polymorphic struct type template "
<<
name
<<
"polymorphic struct type template "
<<
name
<<
" number of type parameters changed from "
<<
" type parameter #"
<<
ent2A
->
getTypeParameters
().
size
()
<<
" to "
<<
i
-
ent2A
->
getTypeParameters
().
begin
()
+
1
<<
ent2B
->
getTypeParameters
().
size
()
<<
std
::
endl
;
<<
" changed from "
<<
*
i
<<
" to "
<<
*
j
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
OUString
>::
const_iterator
}
i
(
ent2A
->
getTypeParameters
().
begin
()),
if
(
ent2A
->
getMembers
().
size
()
!=
ent2B
->
getMembers
().
size
())
j
(
ent2B
->
getTypeParameters
().
begin
());
{
i
!=
ent2A
->
getTypeParameters
().
end
();
++
i
,
++
j
)
std
::
cerr
{
<<
"polymorphic struct type template "
<<
name
if
(
*
i
!=
*
j
)
{
<<
" number of members changed from "
std
::
cerr
<<
ent2A
->
getMembers
().
size
()
<<
" to "
<<
"polymorphic struct type template "
<<
name
<<
ent2B
->
getMembers
().
size
()
<<
std
::
endl
;
<<
" type parameter #"
std
::
exit
(
EXIT_FAILURE
);
<<
i
-
ent2A
->
getTypeParameters
().
begin
()
+
1
}
<<
" changed from "
<<
*
i
<<
" to "
<<
*
j
for
(
std
::
vector
<
unoidl
::
PolymorphicStructTypeTemplateEntity
::
Member
>::
const_iterator
<<
std
::
endl
;
i
(
ent2A
->
getMembers
().
begin
()),
std
::
exit
(
EXIT_FAILURE
);
j
(
ent2B
->
getMembers
().
begin
());
}
i
!=
ent2A
->
getMembers
().
end
();
++
i
,
++
j
)
}
{
if
(
ent2A
->
getMembers
().
size
()
if
(
i
->
name
!=
j
->
name
||
!=
ent2B
->
getMembers
().
size
())
i
->
type
!=
j
->
type
||
i
->
parameterized
!=
j
->
parameterized
)
{
{
std
::
cerr
std
::
cerr
<<
"polymorphic struct type template "
<<
name
<<
"polymorphic struct type template "
<<
name
<<
" number of members changed from "
<<
" member #"
<<
ent2A
->
getMembers
().
size
()
<<
" to "
<<
i
-
ent2A
->
getMembers
().
begin
()
+
1
<<
ent2B
->
getMembers
().
size
()
<<
std
::
endl
;
<<
" changed from "
std
::
exit
(
EXIT_FAILURE
);
<<
(
i
->
parameterized
?
OUString
(
"parameterized "
)
:
OUString
())
}
<<
i
->
type
<<
" "
<<
i
->
name
for
(
std
::
vector
<
unoidl
::
PolymorphicStructTypeTemplateEntity
::
Member
>::
const_iterator
<<
" to "
i
(
ent2A
->
getMembers
().
begin
()),
<<
(
j
->
parameterized
?
OUString
(
"parameterized "
)
:
OUString
())
j
(
ent2B
->
getMembers
().
begin
());
<<
j
->
type
<<
" "
<<
j
->
name
i
!=
ent2A
->
getMembers
().
end
();
++
i
,
++
j
)
<<
std
::
endl
;
{
if
(
i
->
name
!=
j
->
name
||
i
->
type
!=
j
->
type
||
i
->
parameterized
!=
j
->
parameterized
)
{
std
::
cerr
<<
"polymorphic struct type template "
<<
name
<<
" member #"
<<
i
-
ent2A
->
getMembers
().
begin
()
+
1
<<
" changed from "
<<
(
i
->
parameterized
?
OUString
(
"parameterized "
)
:
OUString
())
<<
i
->
type
<<
" "
<<
i
->
name
<<
" to "
<<
(
j
->
parameterized
?
OUString
(
"parameterized "
)
:
OUString
())
<<
j
->
type
<<
" "
<<
j
->
name
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
}
break
;
}
}
break
;
}
case
unoidl
:
:
Entity
::
SORT_EXCEPTION_TYPE
:
case
unoidl
:
:
Entity
::
SORT_EXCEPTION_TYPE
:
{
{
rtl
::
Reference
<
unoidl
::
ExceptionTypeEntity
>
ent2A
(
rtl
::
Reference
<
unoidl
::
ExceptionTypeEntity
>
ent2A
(
static_cast
<
unoidl
::
ExceptionTypeEntity
*>
(
entA
.
get
()));
static_cast
<
unoidl
::
ExceptionTypeEntity
*>
(
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
ExceptionTypeEntity
>
ent2B
(
rtl
::
Reference
<
unoidl
::
ExceptionTypeEntity
>
ent2B
(
static_cast
<
unoidl
::
ExceptionTypeEntity
*>
(
entB
.
get
()));
static_cast
<
unoidl
::
ExceptionTypeEntity
*>
(
entB
.
get
()));
if
(
ent2A
->
getDirectBase
()
!=
ent2B
->
getDirectBase
())
{
if
(
ent2A
->
getDirectBase
()
!=
ent2B
->
getDirectBase
())
std
::
cerr
{
<<
"exception type "
<<
name
std
::
cerr
<<
" direct base changed from "
<<
"exception type "
<<
name
<<
(
ent2A
->
getDirectBase
().
isEmpty
()
<<
" direct base changed from "
?
OUString
(
"none"
)
:
ent2A
->
getDirectBase
())
<<
(
ent2A
->
getDirectBase
().
isEmpty
()
?
OUString
(
"none"
)
:
ent2A
->
getDirectBase
())
<<
" to "
<<
" to "
<<
(
ent2B
->
getDirectBase
().
isEmpty
()
<<
(
ent2B
->
getDirectBase
().
isEmpty
()
?
OUString
(
"none"
)
:
ent2B
->
getDirectBase
())
?
OUString
(
"none"
)
:
ent2B
->
getDirectBase
())
<<
std
::
endl
;
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
if
(
ent2A
->
getDirectMembers
().
size
()
!=
ent2B
->
getDirectMembers
().
size
())
if
(
ent2A
->
getDirectMembers
().
size
()
{
!=
ent2B
->
getDirectMembers
().
size
())
std
::
cerr
<<
"exception type "
<<
name
<<
" number of direct members changed from "
<<
ent2A
->
getDirectMembers
().
size
()
<<
" to "
<<
ent2B
->
getDirectMembers
().
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
for
(
std
::
vector
<
unoidl
::
ExceptionTypeEntity
::
Member
>::
const_iterator
i
(
ent2A
->
getDirectMembers
().
begin
()),
j
(
ent2B
->
getDirectMembers
().
begin
());
i
!=
ent2A
->
getDirectMembers
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
||
i
->
type
!=
j
->
type
)
{
{
std
::
cerr
std
::
cerr
<<
"exception type "
<<
name
<<
"exception type "
<<
name
<<
" number of direct members changed from "
<<
" direct member #"
<<
ent2A
->
getDirectMembers
().
size
()
<<
" to "
<<
i
-
ent2A
->
getDirectMembers
().
begin
()
+
1
<<
ent2B
->
getDirectMembers
().
size
()
<<
std
::
endl
;
<<
" changed from "
<<
i
->
type
<<
" "
<<
i
->
name
<<
" to "
<<
j
->
type
<<
" "
<<
j
->
name
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
ExceptionTypeEntity
::
Member
>::
const_iterator
i
(
ent2A
->
getDirectMembers
().
begin
()),
j
(
ent2B
->
getDirectMembers
().
begin
());
i
!=
ent2A
->
getDirectMembers
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
||
i
->
type
!=
j
->
type
)
{
std
::
cerr
<<
"exception type "
<<
name
<<
" direct member #"
<<
i
-
ent2A
->
getDirectMembers
().
begin
()
+
1
<<
" changed from "
<<
i
->
type
<<
" "
<<
i
->
name
<<
" to "
<<
j
->
type
<<
" "
<<
j
->
name
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
break
;
}
}
break
;
}
case
unoidl
:
:
Entity
::
SORT_INTERFACE_TYPE
:
case
unoidl
:
:
Entity
::
SORT_INTERFACE_TYPE
:
{
{
rtl
::
Reference
<
unoidl
::
InterfaceTypeEntity
>
ent2A
(
rtl
::
Reference
<
unoidl
::
InterfaceTypeEntity
>
ent2A
(
static_cast
<
unoidl
::
InterfaceTypeEntity
*>
(
entA
.
get
()));
static_cast
<
unoidl
::
InterfaceTypeEntity
*>
(
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
InterfaceTypeEntity
>
ent2B
(
rtl
::
Reference
<
unoidl
::
InterfaceTypeEntity
>
ent2B
(
static_cast
<
unoidl
::
InterfaceTypeEntity
*>
(
entB
.
get
()));
static_cast
<
unoidl
::
InterfaceTypeEntity
*>
(
entB
.
get
()));
if
(
ent2A
->
getDirectMandatoryBases
().
size
()
if
(
ent2A
->
getDirectMandatoryBases
().
size
()
!=
ent2B
->
getDirectMandatoryBases
().
size
())
!=
ent2B
->
getDirectMandatoryBases
().
size
())
{
std
::
cerr
<<
"interface type "
<<
name
<<
" number of direct mandatory bases changed from "
<<
ent2A
->
getDirectMandatoryBases
().
size
()
<<
" to "
<<
ent2B
->
getDirectMandatoryBases
().
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
for
(
std
::
vector
<
unoidl
::
AnnotatedReference
>::
const_iterator
i
(
ent2A
->
getDirectMandatoryBases
().
begin
()),
j
(
ent2B
->
getDirectMandatoryBases
().
begin
());
i
!=
ent2A
->
getDirectMandatoryBases
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
)
{
{
std
::
cerr
std
::
cerr
<<
"interface type "
<<
name
<<
"interface type "
<<
name
<<
" number of direct mandatory bases changed from "
<<
" direct mandatory base #"
<<
ent2A
->
getDirectMandatoryBases
().
size
()
<<
" to "
<<
(
i
-
ent2A
->
getDirectMandatoryBases
().
begin
()
<<
ent2B
->
getDirectMandatoryBases
().
size
()
+
1
)
<<
" changed from "
<<
i
->
name
<<
" to "
<<
j
->
name
<<
std
::
endl
;
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
AnnotatedReference
>::
const_iterator
}
i
(
ent2A
->
getDirectMandatoryBases
().
begin
()),
if
(
ent2A
->
getDirectOptionalBases
().
size
()
!=
ent2B
->
getDirectOptionalBases
().
size
())
j
(
ent2B
->
getDirectMandatoryBases
().
begin
());
{
i
!=
ent2A
->
getDirectMandatoryBases
().
end
();
++
i
,
++
j
)
std
::
cerr
{
<<
"interface type "
<<
name
if
(
i
->
name
!=
j
->
name
)
{
<<
" number of direct optional bases changed from "
std
::
cerr
<<
ent2A
->
getDirectOptionalBases
().
size
()
<<
" to "
<<
"interface type "
<<
name
<<
ent2B
->
getDirectOptionalBases
().
size
()
<<
" direct mandatory base #"
<<
std
::
endl
;
<<
(
i
-
ent2A
->
getDirectMandatoryBases
().
begin
()
std
::
exit
(
EXIT_FAILURE
);
+
1
)
}
<<
" changed from "
<<
i
->
name
<<
" to "
for
(
std
::
vector
<
unoidl
::
AnnotatedReference
>::
const_iterator
<<
j
->
name
<<
std
::
endl
;
i
(
ent2A
->
getDirectOptionalBases
().
begin
()),
std
::
exit
(
EXIT_FAILURE
);
j
(
ent2B
->
getDirectOptionalBases
().
begin
());
}
i
!=
ent2A
->
getDirectOptionalBases
().
end
();
++
i
,
++
j
)
}
{
if
(
ent2A
->
getDirectOptionalBases
().
size
()
if
(
i
->
name
!=
j
->
name
)
!=
ent2B
->
getDirectOptionalBases
().
size
())
{
{
std
::
cerr
std
::
cerr
<<
"interface type "
<<
name
<<
"interface type "
<<
name
<<
" number of direct optional bases changed from "
<<
" direct optional base #"
<<
ent2A
->
getDirectOptionalBases
().
size
()
<<
" to "
<<
(
i
-
ent2A
->
getDirectOptionalBases
().
begin
()
+
1
)
<<
ent2B
->
getDirectOptionalBases
().
size
()
<<
" changed from "
<<
i
->
name
<<
" to "
<<
j
->
name
<<
std
::
endl
;
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
AnnotatedReference
>::
const_iterator
}
i
(
ent2A
->
getDirectOptionalBases
().
begin
()),
if
(
ent2A
->
getDirectAttributes
().
size
()
j
(
ent2B
->
getDirectOptionalBases
().
begin
());
!=
ent2B
->
getDirectAttributes
().
size
())
i
!=
ent2A
->
getDirectOptionalBases
().
end
();
++
i
,
++
j
)
{
{
std
::
cerr
if
(
i
->
name
!=
j
->
name
)
{
<<
"interface type "
<<
name
std
::
cerr
<<
" number of direct attributes changed from "
<<
"interface type "
<<
name
<<
ent2A
->
getDirectAttributes
().
size
()
<<
" to "
<<
" direct optional base #"
<<
ent2B
->
getDirectAttributes
().
size
()
<<
std
::
endl
;
<<
(
i
-
ent2A
->
getDirectOptionalBases
().
begin
()
std
::
exit
(
EXIT_FAILURE
);
+
1
)
}
<<
" changed from "
<<
i
->
name
<<
" to "
for
(
std
::
vector
<
unoidl
::
InterfaceTypeEntity
::
Attribute
>::
const_iterator
<<
j
->
name
<<
std
::
endl
;
i
(
ent2A
->
getDirectAttributes
().
begin
()),
std
::
exit
(
EXIT_FAILURE
);
j
(
ent2B
->
getDirectAttributes
().
begin
());
}
i
!=
ent2A
->
getDirectAttributes
().
end
();
++
i
,
++
j
)
}
{
if
(
ent2A
->
getDirectAttributes
().
size
()
if
(
i
->
name
!=
j
->
name
||
!=
ent2B
->
getDirectAttributes
().
size
())
i
->
type
!=
j
->
type
||
i
->
bound
!=
j
->
bound
||
i
->
readOnly
!=
j
->
readOnly
||
i
->
getExceptions
!=
j
->
getExceptions
||
i
->
setExceptions
!=
j
->
setExceptions
)
{
{
std
::
cerr
std
::
cerr
<<
"interface type "
<<
name
<<
"interface type "
<<
name
<<
" number of direct attributes changed from "
<<
" direct attribute #"
<<
ent2A
->
getDirectAttributes
().
size
()
<<
" to "
<<
i
-
ent2A
->
getDirectAttributes
().
begin
()
+
1
<<
ent2B
->
getDirectAttributes
().
size
()
<<
std
::
endl
;
<<
" changed from "
<<
(
i
->
bound
?
OUString
(
"bound "
)
:
OUString
())
<<
(
i
->
readOnly
?
OUString
(
"read-only "
)
:
OUString
())
<<
i
->
type
<<
" "
<<
i
->
name
//TODO: exceptions
<<
" to "
<<
(
j
->
bound
?
OUString
(
"bound "
)
:
OUString
())
<<
(
j
->
readOnly
?
OUString
(
"read-only "
)
:
OUString
())
<<
j
->
type
<<
" "
<<
j
->
name
//TODO: exceptions
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
InterfaceTypeEntity
::
Attribute
>::
const_iterator
}
i
(
ent2A
->
getDirectAttributes
().
begin
()),
if
(
ent2A
->
getDirectMethods
().
size
()
j
(
ent2B
->
getDirectAttributes
().
begin
());
!=
ent2B
->
getDirectMethods
().
size
())
i
!=
ent2A
->
getDirectAttributes
().
end
();
++
i
,
++
j
)
{
std
::
cerr
<<
"interface type "
<<
name
<<
" number of direct methods changed from "
<<
ent2A
->
getDirectMethods
().
size
()
<<
" to "
<<
ent2B
->
getDirectMethods
().
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
for
(
std
::
vector
<
unoidl
::
InterfaceTypeEntity
::
Method
>::
const_iterator
i
(
ent2A
->
getDirectMethods
().
begin
()),
j
(
ent2B
->
getDirectMethods
().
begin
());
i
!=
ent2A
->
getDirectMethods
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
||
i
->
returnType
!=
j
->
returnType
||
i
->
exceptions
!=
j
->
exceptions
)
{
{
if
(
i
->
name
!=
j
->
name
||
i
->
type
!=
j
->
type
std
::
cerr
||
i
->
bound
!=
j
->
bound
<<
"interface type "
<<
name
||
i
->
readOnly
!=
j
->
readOnly
<<
" direct method #"
||
i
->
getExceptions
!=
j
->
getExceptions
<<
i
-
ent2A
->
getDirectMethods
().
begin
()
+
1
||
i
->
setExceptions
!=
j
->
setExceptions
)
<<
" changed from "
{
<<
i
->
returnType
<<
" "
<<
i
->
name
//TODO: exceptions
std
::
cerr
<<
" to "
<<
j
->
returnType
<<
" "
<<
j
->
name
//TODO: exceptions
<<
"interface type "
<<
name
<<
std
::
endl
;
<<
" direct attribute #"
std
::
exit
(
EXIT_FAILURE
);
<<
i
-
ent2A
->
getDirectAttributes
().
begin
()
+
1
<<
" changed from "
<<
(
i
->
bound
?
OUString
(
"bound "
)
:
OUString
())
<<
(
i
->
readOnly
?
OUString
(
"read-only "
)
:
OUString
())
<<
i
->
type
<<
" "
<<
i
->
name
//TODO: exceptions
<<
" to "
<<
(
j
->
bound
?
OUString
(
"bound "
)
:
OUString
())
<<
(
j
->
readOnly
?
OUString
(
"read-only "
)
:
OUString
())
<<
j
->
type
<<
" "
<<
j
->
name
//TODO: exceptions
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
}
if
(
ent2A
->
getDirectMethods
().
size
()
if
(
i
->
parameters
.
size
()
!=
j
->
parameters
.
size
())
!=
ent2B
->
getDirectMethods
().
size
())
{
{
std
::
cerr
std
::
cerr
<<
"interface type "
<<
name
<<
"interface type "
<<
name
<<
" number of direct methods changed from "
<<
" direct method "
<<
i
->
name
<<
ent2A
->
getDirectMethods
().
size
()
<<
" to "
<<
" number of parameters changed from "
<<
ent2B
->
getDirectMethods
().
size
()
<<
std
::
endl
;
<<
i
->
parameters
.
size
()
<<
" to "
<<
j
->
parameters
.
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
InterfaceTypeEntity
::
Method
>::
const_iterator
for
(
std
::
vector
<
unoidl
::
InterfaceTypeEntity
::
Method
::
Parameter
>::
const_iterator
i
(
ent2A
->
getDirectMethods
()
.
begin
()),
k
(
i
->
parameters
.
begin
()),
j
(
ent2B
->
getDirectMethods
()
.
begin
());
l
(
j
->
parameters
.
begin
());
i
!=
ent2A
->
getDirectMethods
().
end
();
++
i
,
++
j
)
k
!=
i
->
parameters
.
end
();
++
k
,
++
l
)
{
{
if
(
i
->
name
!=
j
->
name
||
i
->
returnType
!=
j
->
returnType
if
(
k
->
type
!=
l
->
type
||
k
->
direction
!=
l
->
direction
)
||
i
->
exceptions
!=
j
->
exceptions
)
{
{
std
::
cerr
std
::
cerr
<<
"interface type "
<<
name
<<
"interface type "
<<
name
<<
" direct method #"
<<
" direct method "
<<
i
->
name
<<
i
-
ent2A
->
getDirectMethods
().
begin
()
+
1
<<
" parameter #"
<<
k
-
i
->
parameters
.
begin
()
+
1
<<
" changed from "
<<
" changed from "
<<
i
->
returnType
<<
" "
<<
i
->
name
//TODO: exceptions
<<
showDirection
(
k
->
direction
)
<<
" "
<<
" to "
<<
j
->
returnType
<<
" "
<<
j
->
name
//TODO: exceptions
<<
k
->
type
<<
" to "
<<
showDirection
(
l
->
direction
)
<<
" "
<<
l
->
type
<<
std
::
endl
;
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
if
(
i
->
parameters
.
size
()
!=
j
->
parameters
.
size
())
{
if
(
k
->
name
!=
l
->
name
)
{
std
::
cerr
std
::
cerr
<<
"interface type "
<<
name
<<
"interface type "
<<
name
<<
" direct method "
<<
i
->
name
<<
" direct method "
<<
i
->
name
<<
" number of parameters changed from "
<<
" parameter #"
<<
i
->
parameters
.
size
()
<<
" to "
<<
k
-
i
->
parameters
.
begin
()
+
1
<<
j
->
parameters
.
size
()
<<
std
::
endl
;
<<
" changed name from "
<<
k
->
name
<<
" to "
<<
l
->
name
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
InterfaceTypeEntity
::
Method
::
Parameter
>::
const_iterator
k
(
i
->
parameters
.
begin
()),
l
(
j
->
parameters
.
begin
());
k
!=
i
->
parameters
.
end
();
++
k
,
++
l
)
{
if
(
k
->
type
!=
l
->
type
||
k
->
direction
!=
l
->
direction
)
{
std
::
cerr
<<
"interface type "
<<
name
<<
" direct method "
<<
i
->
name
<<
" parameter #"
<<
k
-
i
->
parameters
.
begin
()
+
1
<<
" changed from "
<<
showDirection
(
k
->
direction
)
<<
" "
<<
k
->
type
<<
" to "
<<
showDirection
(
l
->
direction
)
<<
" "
<<
l
->
type
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
if
(
k
->
name
!=
l
->
name
)
{
std
::
cerr
<<
"interface type "
<<
name
<<
" direct method "
<<
i
->
name
<<
" parameter #"
<<
k
-
i
->
parameters
.
begin
()
+
1
<<
" changed name from "
<<
k
->
name
<<
" to "
<<
l
->
name
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
}
}
break
;
}
}
break
;
}
case
unoidl
:
:
Entity
::
SORT_TYPEDEF
:
case
unoidl
:
:
Entity
::
SORT_TYPEDEF
:
{
{
rtl
::
Reference
<
unoidl
::
TypedefEntity
>
ent2A
(
rtl
::
Reference
<
unoidl
::
TypedefEntity
>
ent2A
(
static_cast
<
unoidl
::
TypedefEntity
*>
(
entA
.
get
()));
static_cast
<
unoidl
::
TypedefEntity
*>
(
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
TypedefEntity
>
ent2B
(
rtl
::
Reference
<
unoidl
::
TypedefEntity
>
ent2B
(
static_cast
<
unoidl
::
TypedefEntity
*>
(
entB
.
get
()));
static_cast
<
unoidl
::
TypedefEntity
*>
(
entB
.
get
()));
if
(
ent2A
->
getType
()
!=
ent2B
->
getType
())
{
if
(
ent2A
->
getType
()
!=
ent2B
->
getType
())
std
::
cerr
{
<<
"typedef "
<<
name
<<
" type changed from "
std
::
cerr
<<
ent2A
->
getType
()
<<
" to "
<<
ent2B
->
getType
()
<<
"typedef "
<<
name
<<
" type changed from "
<<
std
::
endl
;
<<
ent2A
->
getType
()
<<
" to "
<<
ent2B
->
getType
()
std
::
exit
(
EXIT_FAILURE
);
<<
std
::
endl
;
}
std
::
exit
(
EXIT_FAILURE
);
break
;
}
}
break
;
}
case
unoidl
:
:
Entity
::
SORT_CONSTANT_GROUP
:
case
unoidl
:
:
Entity
::
SORT_CONSTANT_GROUP
:
{
{
rtl
::
Reference
<
unoidl
::
ConstantGroupEntity
>
ent2A
(
rtl
::
Reference
<
unoidl
::
ConstantGroupEntity
>
ent2A
(
static_cast
<
unoidl
::
ConstantGroupEntity
*>
(
entA
.
get
()));
static_cast
<
unoidl
::
ConstantGroupEntity
*>
(
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
ConstantGroupEntity
>
ent2B
(
rtl
::
Reference
<
unoidl
::
ConstantGroupEntity
>
ent2B
(
static_cast
<
unoidl
::
ConstantGroupEntity
*>
(
entB
.
get
()));
static_cast
<
unoidl
::
ConstantGroupEntity
*>
(
entB
.
get
()));
for
(
std
::
vector
<
unoidl
::
ConstantGroupEntity
::
Member
>::
const_iterator
i
(
ent2A
->
getMembers
().
begin
());
i
!=
ent2A
->
getMembers
().
end
();
++
i
)
{
bool
found
=
false
;
for
(
std
::
vector
<
unoidl
::
ConstantGroupEntity
::
Member
>::
const_iterator
for
(
std
::
vector
<
unoidl
::
ConstantGroupEntity
::
Member
>::
const_iterator
i
(
ent2A
->
getMembers
().
begin
());
j
(
ent2B
->
getMembers
().
begin
());
i
!=
ent2A
->
getMembers
().
end
();
++
i
)
j
!=
ent2B
->
getMembers
().
end
();
++
j
)
{
{
bool
found
=
false
;
if
(
i
->
name
==
j
->
name
)
for
(
std
::
vector
<
unoidl
::
ConstantGroupEntity
::
Member
>::
const_iterator
j
(
ent2B
->
getMembers
().
begin
());
j
!=
ent2B
->
getMembers
().
end
();
++
j
)
{
{
if
(
i
->
name
==
j
->
name
)
{
if
(
i
->
value
!=
j
->
value
)
if
(
i
->
value
!=
j
->
value
)
{
{
std
::
cerr
std
::
cerr
<<
"constant group "
<<
name
<<
"constant group "
<<
name
<<
" member "
<<
i
->
name
<<
" member "
<<
i
->
name
<<
" changed value"
<<
std
::
endl
;
<<
" changed value"
std
::
exit
(
EXIT_FAILURE
);
<<
std
::
endl
;
}
std
::
exit
(
EXIT_FAILURE
);
found
=
true
;
break
;
}
}
}
found
=
true
;
if
(
!
found
)
{
break
;
std
::
cerr
<<
"A constant group "
<<
name
<<
" member "
<<
i
->
name
<<
" is not present in B"
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
}
}
break
;
if
(
!
found
)
}
case
unoidl
:
:
Entity
::
SORT_SINGLE_INTERFACE_BASED_SERVICE
:
{
rtl
::
Reference
<
unoidl
::
SingleInterfaceBasedServiceEntity
>
ent2A
(
static_cast
<
unoidl
::
SingleInterfaceBasedServiceEntity
*>
(
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
SingleInterfaceBasedServiceEntity
>
ent2B
(
static_cast
<
unoidl
::
SingleInterfaceBasedServiceEntity
*>
(
entB
.
get
()));
if
(
ent2A
->
getBase
()
!=
ent2B
->
getBase
())
{
std
::
cerr
<<
"single-interface--based servcie "
<<
name
<<
" base changed from "
<<
ent2A
->
getBase
()
<<
" to "
<<
ent2B
->
getBase
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
if
(
ent2A
->
getConstructors
().
size
()
!=
ent2B
->
getConstructors
().
size
())
{
{
std
::
cerr
std
::
cerr
<<
"single-interface--based service "
<<
name
<<
"A constant group "
<<
name
<<
" member "
<<
" number of constructors changed from "
<<
i
->
name
<<
" is not present in B"
<<
ent2A
->
getConstructors
().
size
()
<<
" to "
<<
std
::
endl
;
<<
ent2B
->
getConstructors
().
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
SingleInterfaceBasedServiceEntity
::
Constructor
>::
const_iterator
i
(
ent2A
->
getConstructors
().
begin
()),
j
(
ent2B
->
getConstructors
().
begin
());
i
!=
ent2A
->
getConstructors
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
||
i
->
parameters
!=
j
->
parameters
||
i
->
exceptions
!=
j
->
exceptions
||
i
->
defaultConstructor
!=
j
->
defaultConstructor
)
{
std
::
cerr
<<
"single-interface--based service "
<<
name
<<
" constructor #"
<<
i
-
ent2A
->
getConstructors
().
begin
()
+
1
<<
" changed from "
<<
(
i
->
defaultConstructor
?
OUString
(
"default "
)
:
i
->
name
)
//TODO: parameters, exceptions
<<
" to "
<<
(
j
->
defaultConstructor
?
OUString
(
"default "
)
:
j
->
name
)
//TODO: parameters, exceptions
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
break
;
}
}
case
unoidl
:
:
Entity
::
SORT_ACCUMULATION_BASED_SERVICE
:
break
;
}
case
unoidl
:
:
Entity
::
SORT_SINGLE_INTERFACE_BASED_SERVICE
:
{
rtl
::
Reference
<
unoidl
::
SingleInterfaceBasedServiceEntity
>
ent2A
(
static_cast
<
unoidl
::
SingleInterfaceBasedServiceEntity
*>
(
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
SingleInterfaceBasedServiceEntity
>
ent2B
(
static_cast
<
unoidl
::
SingleInterfaceBasedServiceEntity
*>
(
entB
.
get
()));
if
(
ent2A
->
getBase
()
!=
ent2B
->
getBase
())
{
std
::
cerr
<<
"single-interface--based servcie "
<<
name
<<
" base changed from "
<<
ent2A
->
getBase
()
<<
" to "
<<
ent2B
->
getBase
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
if
(
ent2A
->
getConstructors
().
size
()
!=
ent2B
->
getConstructors
().
size
())
{
{
rtl
::
Reference
<
unoidl
::
AccumulationBasedServiceEntity
>
std
::
cerr
ent2A
(
<<
"single-interface--based service "
<<
name
static_cast
<
unoidl
::
AccumulationBasedServiceEntity
*>
(
<<
" number of constructors changed from "
entA
.
get
()));
<<
ent2A
->
getConstructors
().
size
()
<<
" to "
rtl
::
Reference
<
unoidl
::
AccumulationBasedServiceEntity
>
<<
ent2B
->
getConstructors
().
size
()
<<
std
::
endl
;
ent2B
(
std
::
exit
(
EXIT_FAILURE
);
static_cast
<
unoidl
::
AccumulationBasedServiceEntity
*>
(
}
entB
.
get
()));
for
(
std
::
vector
<
unoidl
::
SingleInterfaceBasedServiceEntity
::
Constructor
>::
const_iterator
if
(
ent2A
->
getDirectMandatoryBaseServices
().
size
()
i
(
ent2A
->
getConstructors
().
begin
()),
!=
ent2B
->
getDirectMandatoryBaseServices
().
size
())
j
(
ent2B
->
getConstructors
().
begin
());
i
!=
ent2A
->
getConstructors
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
||
i
->
parameters
!=
j
->
parameters
||
i
->
exceptions
!=
j
->
exceptions
||
i
->
defaultConstructor
!=
j
->
defaultConstructor
)
{
{
std
::
cerr
std
::
cerr
<<
"accumulation-based service "
<<
name
<<
"single-interface--based service "
<<
name
<<
(
" number of direct mandatory base services"
<<
" constructor #"
" changed from "
)
<<
i
-
ent2A
->
getConstructors
().
begin
()
+
1
<<
ent2A
->
getDirectMandatoryBaseServices
().
size
()
<<
" changed from "
<<
(
i
->
defaultConstructor
?
OUString
(
"default "
)
:
i
->
name
)
//TODO: parameters, exceptions
<<
" to "
<<
" to "
<<
ent2B
->
getDirectMandatoryBaseServices
().
size
()
<<
(
j
->
defaultConstructor
?
OUString
(
"default "
)
:
j
->
name
)
//TODO: parameters, exceptions
<<
std
::
endl
;
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
AnnotatedReference
>::
const_iterator
}
i
(
ent2A
->
getDirectMandatoryBaseServices
().
begin
()),
break
;
j
(
ent2B
->
getDirectMandatoryBaseServices
().
begin
());
}
i
!=
ent2A
->
getDirectMandatoryBaseServices
().
end
();
case
unoidl
:
:
Entity
::
SORT_ACCUMULATION_BASED_SERVICE
:
++
i
,
++
j
)
{
{
rtl
::
Reference
<
unoidl
::
AccumulationBasedServiceEntity
>
if
(
i
->
name
!=
j
->
name
)
{
ent2A
(
static_cast
<
unoidl
::
AccumulationBasedServiceEntity
*>
(
entA
.
get
()));
std
::
cerr
rtl
::
Reference
<
unoidl
::
AccumulationBasedServiceEntity
>
<<
"accumulation-based service "
<<
name
ent2B
(
static_cast
<
unoidl
::
AccumulationBasedServiceEntity
*>
(
entB
.
get
()));
<<
" direct mandatory base service #"
<<
(
i
if
(
ent2A
->
getDirectMandatoryBaseServices
().
size
()
!=
ent2B
->
getDirectMandatoryBaseServices
().
size
())
-
(
ent2A
->
getDirectMandatoryBaseServices
()
{
.
begin
())
std
::
cerr
+
1
)
<<
"accumulation-based service "
<<
name
<<
" changed from "
<<
i
->
name
<<
" to "
<<
" number of direct mandatory base services changed from "
<<
j
->
name
<<
std
::
endl
;
<<
ent2A
->
getDirectMandatoryBaseServices
().
size
()
std
::
exit
(
EXIT_FAILURE
);
<<
" to "
}
<<
ent2B
->
getDirectMandatoryBaseServices
().
size
()
}
<<
std
::
endl
;
if
(
ent2A
->
getDirectOptionalBaseServices
().
size
()
std
::
exit
(
EXIT_FAILURE
);
>
ent2B
->
getDirectOptionalBaseServices
().
size
())
}
for
(
std
::
vector
<
unoidl
::
AnnotatedReference
>::
const_iterator
i
(
ent2A
->
getDirectMandatoryBaseServices
().
begin
()),
j
(
ent2B
->
getDirectMandatoryBaseServices
().
begin
());
i
!=
ent2A
->
getDirectMandatoryBaseServices
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
)
{
{
std
::
cerr
std
::
cerr
<<
"accumulation-based service "
<<
name
<<
"accumulation-based service "
<<
name
<<
(
" number of direct optional base services"
<<
" direct mandatory base service #"
" shrank from "
)
<<
(
i
-
(
ent2A
->
getDirectMandatoryBaseServices
().
begin
())
+
1
)
<<
ent2A
->
getDirectOptionalBaseServices
().
size
()
<<
" changed from "
<<
i
->
name
<<
" to "
<<
" to "
<<
j
->
name
<<
std
::
endl
;
<<
ent2B
->
getDirectOptionalBaseServices
().
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
AnnotatedReference
>::
const_iterator
}
i
(
ent2A
->
getDirectOptionalBaseServices
().
begin
());
if
(
ent2A
->
getDirectOptionalBaseServices
().
size
()
>
ent2B
->
getDirectOptionalBaseServices
().
size
())
i
!=
ent2A
->
getDirectOptionalBaseServices
().
end
();
{
++
i
)
std
::
cerr
{
<<
"accumulation-based service "
<<
name
if
(
std
::
find_if
(
<<
" number of direct optional base services shrank from "
<<
ent2A
->
getDirectOptionalBaseServices
().
size
()
<<
" to "
<<
ent2B
->
getDirectOptionalBaseServices
().
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
for
(
std
::
vector
<
unoidl
::
AnnotatedReference
>::
const_iterator
i
(
ent2A
->
getDirectOptionalBaseServices
().
begin
());
i
!=
ent2A
->
getDirectOptionalBaseServices
().
end
();
++
i
)
{
if
(
std
::
find_if
(
ent2B
->
getDirectOptionalBaseServices
().
begin
(),
ent2B
->
getDirectOptionalBaseServices
().
begin
(),
ent2B
->
getDirectOptionalBaseServices
().
end
(),
ent2B
->
getDirectOptionalBaseServices
().
end
(),
EqualsAnnotation
(
i
->
name
))
EqualsAnnotation
(
i
->
name
))
==
ent2B
->
getDirectOptionalBaseServices
().
end
())
==
ent2B
->
getDirectOptionalBaseServices
().
end
())
{
std
::
cerr
<<
"accumulation-based service "
<<
name
<<
" direct optional base service "
<<
i
->
name
<<
" was removed"
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
if
(
ent2A
->
getDirectMandatoryBaseInterfaces
().
size
()
!=
ent2B
->
getDirectMandatoryBaseInterfaces
().
size
())
{
{
std
::
cerr
std
::
cerr
<<
"accumulation-based service "
<<
name
<<
"accumulation-based service "
<<
name
<<
(
" number of direct mandatory base interfaces"
<<
" direct optional base service "
<<
i
->
name
" changed from "
)
<<
" was removed"
<<
std
::
endl
;
<<
ent2A
->
getDirectMandatoryBaseInterfaces
().
size
()
<<
" to "
<<
ent2B
->
getDirectMandatoryBaseInterfaces
().
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
AnnotatedReference
>::
const_iterator
}
i
(
ent2A
->
getDirectMandatoryBaseInterfaces
()
if
(
ent2A
->
getDirectMandatoryBaseInterfaces
().
size
()
.
begin
()),
!=
ent2B
->
getDirectMandatoryBaseInterfaces
().
size
())
j
(
ent2B
->
getDirectMandatoryBaseInterfaces
()
{
.
begin
());
std
::
cerr
i
!=
ent2A
->
getDirectMandatoryBaseInterfaces
().
end
();
<<
"accumulation-based service "
<<
name
++
i
,
++
j
)
<<
(
" number of direct mandatory base interfaces"
{
" changed from "
)
if
(
i
->
name
!=
j
->
name
)
{
<<
ent2A
->
getDirectMandatoryBaseInterfaces
().
size
()
std
::
cerr
<<
" to "
<<
"accumulation-based service "
<<
name
<<
ent2B
->
getDirectMandatoryBaseInterfaces
().
size
()
<<
" direct mandatory base interface #"
<<
std
::
endl
;
<<
(
i
std
::
exit
(
EXIT_FAILURE
);
-
(
ent2A
->
getDirectMandatoryBaseInterfaces
()
}
.
begin
())
for
(
std
::
vector
<
unoidl
::
AnnotatedReference
>::
const_iterator
+
1
)
i
(
ent2A
->
getDirectMandatoryBaseInterfaces
().
begin
()),
<<
" changed from "
<<
i
->
name
<<
" to "
j
(
ent2B
->
getDirectMandatoryBaseInterfaces
().
begin
());
<<
j
->
name
<<
std
::
endl
;
i
!=
ent2A
->
getDirectMandatoryBaseInterfaces
().
end
();
std
::
exit
(
EXIT_FAILURE
);
++
i
,
++
j
)
}
{
}
if
(
i
->
name
!=
j
->
name
)
if
(
ent2A
->
getDirectOptionalBaseInterfaces
().
size
()
>
ent2B
->
getDirectOptionalBaseInterfaces
().
size
())
{
{
std
::
cerr
std
::
cerr
<<
"accumulation-based service "
<<
name
<<
"accumulation-based service "
<<
name
<<
(
" number of direct optional base interfaces"
<<
" direct mandatory base interface #"
" shrank from "
)
<<
(
i
-
(
ent2A
->
getDirectMandatoryBaseInterfaces
().
begin
())
+
1
)
<<
ent2A
->
getDirectOptionalBaseInterfaces
().
size
()
<<
" changed from "
<<
i
->
name
<<
" to "
<<
" to "
<<
j
->
name
<<
std
::
endl
;
<<
ent2B
->
getDirectOptionalBaseInterfaces
().
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
AnnotatedReference
>::
const_iterator
}
i
(
ent2A
->
getDirectOptionalBaseInterfaces
()
if
(
ent2A
->
getDirectOptionalBaseInterfaces
().
size
()
>
ent2B
->
getDirectOptionalBaseInterfaces
().
size
())
.
begin
());
{
i
!=
ent2A
->
getDirectOptionalBaseInterfaces
().
end
();
std
::
cerr
++
i
)
<<
"accumulation-based service "
<<
name
{
<<
(
" number of direct optional base interfaces"
if
(
std
::
find_if
(
" shrank from "
)
(
ent2B
->
getDirectOptionalBaseInterfaces
()
<<
ent2A
->
getDirectOptionalBaseInterfaces
().
size
()
.
begin
()),
<<
" to "
<<
ent2B
->
getDirectOptionalBaseInterfaces
().
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
for
(
std
::
vector
<
unoidl
::
AnnotatedReference
>::
const_iterator
i
(
ent2A
->
getDirectOptionalBaseInterfaces
().
begin
());
i
!=
ent2A
->
getDirectOptionalBaseInterfaces
().
end
();
++
i
)
{
if
(
std
::
find_if
(
(
ent2B
->
getDirectOptionalBaseInterfaces
().
begin
()),
ent2B
->
getDirectOptionalBaseInterfaces
().
end
(),
ent2B
->
getDirectOptionalBaseInterfaces
().
end
(),
EqualsAnnotation
(
i
->
name
))
EqualsAnnotation
(
i
->
name
))
==
ent2B
->
getDirectOptionalBaseInterfaces
().
end
())
==
ent2B
->
getDirectOptionalBaseInterfaces
().
end
())
{
std
::
cerr
<<
"accumulation-based service "
<<
name
<<
" direct optional base interface "
<<
i
->
name
<<
" was removed"
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
if
(
ent2A
->
getDirectProperties
().
size
()
>
ent2B
->
getDirectProperties
().
size
())
{
{
std
::
cerr
std
::
cerr
<<
"accumulation-based service "
<<
name
<<
"accumulation-based service "
<<
name
<<
" number of direct properties changed from "
<<
" direct optional base interface "
<<
i
->
name
<<
ent2A
->
getDirectProperties
().
size
()
<<
" to "
<<
" was removed"
<<
std
::
endl
;
<<
ent2B
->
getDirectProperties
().
size
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
AccumulationBasedServiceEntity
::
Property
>::
const_iterator
i
(
ent2A
->
getDirectProperties
().
begin
()),
j
(
ent2B
->
getDirectProperties
().
begin
());
i
!=
ent2A
->
getDirectProperties
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
||
i
->
type
!=
j
->
type
||
i
->
attributes
!=
j
->
attributes
)
{
std
::
cerr
<<
"accumulation-based service "
<<
name
<<
" direct property #"
<<
i
-
ent2A
->
getDirectProperties
().
begin
()
+
1
<<
" changed from "
<<
i
->
type
<<
" "
<<
i
->
name
//TODO: attributes
<<
" to "
<<
j
->
type
<<
" "
<<
j
->
name
//TODO: attributes
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
AccumulationBasedServiceEntity
::
Property
>::
const_iterator
i
(
ent2B
->
getDirectProperties
().
begin
()
+
ent2A
->
getDirectProperties
().
size
());
i
!=
ent2B
->
getDirectProperties
().
end
();
++
i
)
{
if
((
i
->
attributes
&
unoidl
::
AccumulationBasedServiceEntity
::
Property
::
ATTRIBUTE_OPTIONAL
)
==
0
)
{
std
::
cerr
<<
"B accumulation-based service "
<<
name
<<
" additional direct property "
<<
i
->
name
<<
" is not optional"
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
break
;
}
}
case
unoidl
:
:
Entity
::
SORT_INTERFACE_BASED_SINGLETON
:
if
(
ent2A
->
getDirectProperties
().
size
()
>
ent2B
->
getDirectProperties
().
size
())
{
{
rtl
::
Reference
<
unoidl
::
InterfaceBasedSingletonEntity
>
ent2A
(
std
::
cerr
static_cast
<
unoidl
::
InterfaceBasedSingletonEntity
*>
(
<<
"accumulation-based service "
<<
name
entA
.
get
()));
<<
" number of direct properties changed from "
rtl
::
Reference
<
unoidl
::
InterfaceBasedSingletonEntity
>
ent2B
(
<<
ent2A
->
getDirectProperties
().
size
()
<<
" to "
static_cast
<
unoidl
::
InterfaceBasedSingletonEntity
*>
(
<<
ent2B
->
getDirectProperties
().
size
()
<<
std
::
endl
;
entB
.
get
()));
std
::
exit
(
EXIT_FAILURE
);
if
(
ent2A
->
getBase
()
!=
ent2B
->
getBase
())
{
}
for
(
std
::
vector
<
unoidl
::
AccumulationBasedServiceEntity
::
Property
>::
const_iterator
i
(
ent2A
->
getDirectProperties
().
begin
()),
j
(
ent2B
->
getDirectProperties
().
begin
());
i
!=
ent2A
->
getDirectProperties
().
end
();
++
i
,
++
j
)
{
if
(
i
->
name
!=
j
->
name
||
i
->
type
!=
j
->
type
||
i
->
attributes
!=
j
->
attributes
)
{
std
::
cerr
std
::
cerr
<<
"interface-based singleton "
<<
name
<<
"accumulation-based service "
<<
name
<<
" base changed from "
<<
ent2A
->
getBase
()
<<
" direct property #"
<<
" to "
<<
ent2B
->
getBase
()
<<
std
::
endl
;
<<
i
-
ent2A
->
getDirectProperties
().
begin
()
+
1
<<
" changed from "
<<
i
->
type
<<
" "
<<
i
->
name
//TODO: attributes
<<
" to "
<<
j
->
type
<<
" "
<<
j
->
name
//TODO: attributes
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
break
;
}
}
case
unoidl
:
:
Entity
::
SORT_SERVICE_BASED_SINGLETON
:
for
(
std
::
vector
<
unoidl
::
AccumulationBasedServiceEntity
::
Property
>::
const_iterator
i
(
ent2B
->
getDirectProperties
().
begin
()
+
ent2A
->
getDirectProperties
().
size
());
i
!=
ent2B
->
getDirectProperties
().
end
();
++
i
)
{
{
rtl
::
Reference
<
unoidl
::
ServiceBasedSingletonEntity
>
ent2A
(
if
((
i
->
attributes
&
unoidl
::
AccumulationBasedServiceEntity
::
Property
::
ATTRIBUTE_OPTIONAL
)
==
0
)
static_cast
<
unoidl
::
ServiceBasedSingletonEntity
*>
(
{
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
ServiceBasedSingletonEntity
>
ent2B
(
static_cast
<
unoidl
::
ServiceBasedSingletonEntity
*>
(
entB
.
get
()));
if
(
ent2A
->
getBase
()
!=
ent2B
->
getBase
())
{
std
::
cerr
std
::
cerr
<<
"
service-based singleton
"
<<
name
<<
"
B accumulation-based service
"
<<
name
<<
"
base changed from "
<<
ent2A
->
getBase
()
<<
"
additional direct property "
<<
i
->
name
<<
"
to "
<<
ent2B
->
getBase
()
<<
std
::
endl
;
<<
"
is not optional"
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
break
;
}
}
break
;
}
case
unoidl
:
:
Entity
::
SORT_INTERFACE_BASED_SINGLETON
:
{
rtl
::
Reference
<
unoidl
::
InterfaceBasedSingletonEntity
>
ent2A
(
static_cast
<
unoidl
::
InterfaceBasedSingletonEntity
*>
(
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
InterfaceBasedSingletonEntity
>
ent2B
(
static_cast
<
unoidl
::
InterfaceBasedSingletonEntity
*>
(
entB
.
get
()));
if
(
ent2A
->
getBase
()
!=
ent2B
->
getBase
())
{
std
::
cerr
<<
"interface-based singleton "
<<
name
<<
" base changed from "
<<
ent2A
->
getBase
()
<<
" to "
<<
ent2B
->
getBase
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
break
;
}
case
unoidl
:
:
Entity
::
SORT_SERVICE_BASED_SINGLETON
:
{
rtl
::
Reference
<
unoidl
::
ServiceBasedSingletonEntity
>
ent2A
(
static_cast
<
unoidl
::
ServiceBasedSingletonEntity
*>
(
entA
.
get
()));
rtl
::
Reference
<
unoidl
::
ServiceBasedSingletonEntity
>
ent2B
(
static_cast
<
unoidl
::
ServiceBasedSingletonEntity
*>
(
entB
.
get
()));
if
(
ent2A
->
getBase
()
!=
ent2B
->
getBase
())
{
std
::
cerr
<<
"service-based singleton "
<<
name
<<
" base changed from "
<<
ent2A
->
getBase
()
<<
" to "
<<
ent2B
->
getBase
()
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
break
;
}
}
}
}
}
}
}
}
}
bool
valid
(
OUString
const
&
identifier
)
{
bool
valid
(
OUString
const
&
identifier
)
for
(
sal_Int32
i
=
0
;;
++
i
)
{
{
for
(
sal_Int32
i
=
0
;;
++
i
)
{
i
=
identifier
.
indexOf
(
'_'
,
i
);
i
=
identifier
.
indexOf
(
'_'
,
i
);
if
(
i
==
-
1
)
{
if
(
i
==
-
1
)
{
return
true
;
return
true
;
}
}
if
(
!
rtl
::
isAsciiUpperCase
(
identifier
[
0
])
||
identifier
[
i
-
1
]
==
'_'
)
{
if
(
!
rtl
::
isAsciiUpperCase
(
identifier
[
0
])
||
identifier
[
i
-
1
]
==
'_'
)
{
return
false
;
return
false
;
}
}
}
}
}
}
void
checkIds
(
void
checkIds
(
rtl
::
Reference
<
unoidl
::
Provider
>
const
&
providerA
,
OUString
const
&
prefix
,
rtl
::
Reference
<
unoidl
::
Provider
>
const
&
providerA
,
OUString
const
&
prefix
,
rtl
::
Reference
<
unoidl
::
MapCursor
>
const
&
cursor
)
rtl
::
Reference
<
unoidl
::
MapCursor
>
const
&
cursor
)
{
{
assert
(
cursor
.
is
());
assert
(
cursor
.
is
());
for
(;;)
{
for
(;;)
{
OUString
id
;
OUString
id
;
rtl
::
Reference
<
unoidl
::
Entity
>
entB
(
cursor
->
getNext
(
&
id
));
rtl
::
Reference
<
unoidl
::
Entity
>
entB
(
cursor
->
getNext
(
&
id
));
if
(
!
entB
.
is
())
{
if
(
!
entB
.
is
())
{
break
;
break
;
}
}
OUString
name
(
prefix
+
id
);
OUString
name
(
prefix
+
id
);
rtl
::
Reference
<
unoidl
::
Entity
>
entA
(
providerA
->
findEntity
(
name
));
rtl
::
Reference
<
unoidl
::
Entity
>
entA
(
providerA
->
findEntity
(
name
));
if
(
!
(
entA
.
is
()
||
valid
(
id
)))
{
if
(
!
(
entA
.
is
()
||
valid
(
id
)))
{
std
::
cerr
std
::
cerr
<<
"entity name "
<<
name
<<
" uses an invalid identifier"
<<
"entity name "
<<
name
<<
" uses an invalid identifier"
<<
std
::
endl
;
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
switch
(
entB
->
getSort
())
{
switch
(
entB
->
getSort
())
{
case
unoidl
:
:
Entity
::
SORT_MODULE
:
case
unoidl
:
:
Entity
::
SORT_MODULE
:
checkIds
(
checkIds
(
providerA
,
name
+
"."
,
providerA
,
name
+
"."
,
(
static_cast
<
unoidl
::
ModuleEntity
*>
(
entB
.
get
())
->
createCursor
()));
(
static_cast
<
unoidl
::
ModuleEntity
*>
(
entB
.
get
())
->
createCursor
()));
break
;
break
;
case
unoidl
:
:
Entity
::
SORT_ENUM_TYPE
:
case
unoidl
:
:
Entity
::
SORT_ENUM_TYPE
:
if
(
!
entA
.
is
())
{
if
(
!
entA
.
is
())
rtl
::
Reference
<
unoidl
::
EnumTypeEntity
>
ent2B
(
{
static_cast
<
unoidl
::
EnumTypeEntity
*>
(
entB
.
get
()));
rtl
::
Reference
<
unoidl
::
EnumTypeEntity
>
ent2B
(
static_cast
<
unoidl
::
EnumTypeEntity
*>
(
entB
.
get
()));
for
(
std
::
vector
<
unoidl
::
EnumTypeEntity
::
Member
>::
const_iterator
for
(
std
::
vector
<
unoidl
::
EnumTypeEntity
::
Member
>::
const_iterator
i
(
ent2B
->
getMembers
().
begin
());
i
(
ent2B
->
getMembers
().
begin
());
i
!=
ent2B
->
getMembers
().
end
();
++
i
)
i
!=
ent2B
->
getMembers
().
end
();
++
i
)
{
{
if
(
!
valid
(
i
->
name
))
{
if
(
!
valid
(
i
->
name
))
{
std
::
cerr
std
::
cerr
<<
"enum type "
<<
name
<<
" member "
<<
i
->
name
<<
"enum type "
<<
name
<<
" member "
<<
i
->
name
<<
" uses an invalid identifier"
<<
std
::
endl
;
<<
" uses an invalid identifier"
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
}
}
}
}
break
;
break
;
case
unoidl
:
:
Entity
::
SORT_PLAIN_STRUCT_TYPE
:
case
unoidl
:
:
Entity
::
SORT_PLAIN_STRUCT_TYPE
:
if
(
!
entA
.
is
())
{
if
(
!
entA
.
is
())
{
rtl
::
Reference
<
unoidl
::
PlainStructTypeEntity
>
ent2B
(
rtl
::
Reference
<
unoidl
::
PlainStructTypeEntity
>
ent2B
(
static_cast
<
unoidl
::
PlainStructTypeEntity
*>
(
static_cast
<
unoidl
::
PlainStructTypeEntity
*>
(
entB
.
get
()));
entB
.
get
()));
for
(
std
::
vector
<
unoidl
::
PlainStructTypeEntity
::
Member
>::
const_iterator
for
(
std
::
vector
<
unoidl
::
PlainStructTypeEntity
::
Member
>::
const_iterator
i
(
ent2B
->
getDirectMembers
().
begin
());
i
(
ent2B
->
getDirectMembers
().
begin
());
i
!=
ent2B
->
getDirectMembers
().
end
();
++
i
)
i
!=
ent2B
->
getDirectMembers
().
end
();
++
i
)
{
{
if
(
!
valid
(
i
->
name
))
{
if
(
!
valid
(
i
->
name
))
{
std
::
cerr
std
::
cerr
<<
"plain struct type "
<<
name
<<
" direct member "
<<
"plain struct type "
<<
name
<<
" direct member "
<<
i
->
name
<<
" uses an invalid identifier"
<<
i
->
name
<<
" uses an invalid identifier"
...
@@ -967,21 +988,21 @@ void checkIds(
...
@@ -967,21 +988,21 @@ void checkIds(
}
}
break
;
break
;
case
unoidl
:
:
Entity
::
SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE
:
case
unoidl
:
:
Entity
::
SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE
:
if
(
!
entA
.
is
())
{
if
(
!
entA
.
is
())
{
rtl
::
Reference
<
unoidl
::
PolymorphicStructTypeTemplateEntity
>
rtl
::
Reference
<
unoidl
::
PolymorphicStructTypeTemplateEntity
>
ent2B
(
ent2B
(
static_cast
<
unoidl
::
PolymorphicStructTypeTemplateEntity
*>
(
entB
.
get
()));
static_cast
<
unoidl
::
PolymorphicStructTypeTemplateEntity
*>
(
for
(
std
::
vector
<
OUString
>::
const_iterator
i
(
ent2B
->
getTypeParameters
().
begin
());
entB
.
get
()));
for
(
std
::
vector
<
OUString
>::
const_iterator
i
(
ent2B
->
getTypeParameters
().
begin
());
i
!=
ent2B
->
getTypeParameters
().
end
();
++
i
)
i
!=
ent2B
->
getTypeParameters
().
end
();
++
i
)
{
{
if
(
!
valid
(
*
i
))
{
if
(
!
valid
(
*
i
))
{
std
::
cerr
std
::
cerr
<<
"polymorphic struct type template "
<<
name
<<
"polymorphic struct type template "
<<
name
<<
" type parameter "
<<
*
i
<<
" type parameter "
<<
*
i
<<
" uses an invalid identifier"
<<
std
::
endl
;
<<
" uses an invalid identifier"
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
}
}
...
@@ -989,7 +1010,8 @@ void checkIds(
...
@@ -989,7 +1010,8 @@ void checkIds(
i
(
ent2B
->
getMembers
().
begin
());
i
(
ent2B
->
getMembers
().
begin
());
i
!=
ent2B
->
getMembers
().
end
();
++
i
)
i
!=
ent2B
->
getMembers
().
end
();
++
i
)
{
{
if
(
!
valid
(
i
->
name
))
{
if
(
!
valid
(
i
->
name
))
{
std
::
cerr
std
::
cerr
<<
"polymorphic struct type template "
<<
name
<<
"polymorphic struct type template "
<<
name
<<
" member "
<<
i
->
name
<<
" member "
<<
i
->
name
...
@@ -1000,14 +1022,17 @@ void checkIds(
...
@@ -1000,14 +1022,17 @@ void checkIds(
}
}
break
;
break
;
case
unoidl
:
:
Entity
::
SORT_EXCEPTION_TYPE
:
case
unoidl
:
:
Entity
::
SORT_EXCEPTION_TYPE
:
if
(
!
entA
.
is
())
{
if
(
!
entA
.
is
())
{
rtl
::
Reference
<
unoidl
::
ExceptionTypeEntity
>
ent2B
(
rtl
::
Reference
<
unoidl
::
ExceptionTypeEntity
>
ent2B
(
static_cast
<
unoidl
::
ExceptionTypeEntity
*>
(
entB
.
get
()));
static_cast
<
unoidl
::
ExceptionTypeEntity
*>
(
entB
.
get
()));
for
(
std
::
vector
<
unoidl
::
ExceptionTypeEntity
::
Member
>::
const_iterator
for
(
std
::
vector
<
unoidl
::
ExceptionTypeEntity
::
Member
>::
const_iterator
i
(
ent2B
->
getDirectMembers
().
begin
());
i
(
ent2B
->
getDirectMembers
().
begin
());
i
!=
ent2B
->
getDirectMembers
().
end
();
++
i
)
i
!=
ent2B
->
getDirectMembers
().
end
();
++
i
)
{
{
if
(
!
valid
(
i
->
name
))
{
if
(
!
valid
(
i
->
name
))
{
std
::
cerr
std
::
cerr
<<
"exception type "
<<
name
<<
" direct member "
<<
"exception type "
<<
name
<<
" direct member "
<<
i
->
name
<<
" uses an invalid identifier"
<<
i
->
name
<<
" uses an invalid identifier"
...
@@ -1018,14 +1043,16 @@ void checkIds(
...
@@ -1018,14 +1043,16 @@ void checkIds(
}
}
break
;
break
;
case
unoidl
:
:
Entity
::
SORT_INTERFACE_TYPE
:
case
unoidl
:
:
Entity
::
SORT_INTERFACE_TYPE
:
if
(
!
entA
.
is
())
{
if
(
!
entA
.
is
())
{
rtl
::
Reference
<
unoidl
::
InterfaceTypeEntity
>
ent2B
(
rtl
::
Reference
<
unoidl
::
InterfaceTypeEntity
>
ent2B
(
static_cast
<
unoidl
::
InterfaceTypeEntity
*>
(
entB
.
get
()));
static_cast
<
unoidl
::
InterfaceTypeEntity
*>
(
entB
.
get
()));
for
(
std
::
vector
<
unoidl
::
InterfaceTypeEntity
::
Attribute
>::
const_iterator
for
(
std
::
vector
<
unoidl
::
InterfaceTypeEntity
::
Attribute
>::
const_iterator
i
(
ent2B
->
getDirectAttributes
().
begin
());
i
(
ent2B
->
getDirectAttributes
().
begin
());
i
!=
ent2B
->
getDirectAttributes
().
end
();
++
i
)
i
!=
ent2B
->
getDirectAttributes
().
end
();
++
i
)
{
{
if
(
!
valid
(
i
->
name
))
{
if
(
!
valid
(
i
->
name
))
{
std
::
cerr
std
::
cerr
<<
"interface type "
<<
name
<<
" direct attribute "
<<
"interface type "
<<
name
<<
" direct attribute "
<<
i
->
name
<<
" uses an invalid identifier"
<<
i
->
name
<<
" uses an invalid identifier"
...
@@ -1037,7 +1064,8 @@ void checkIds(
...
@@ -1037,7 +1064,8 @@ void checkIds(
i
(
ent2B
->
getDirectMethods
().
begin
());
i
(
ent2B
->
getDirectMethods
().
begin
());
i
!=
ent2B
->
getDirectMethods
().
end
();
++
i
)
i
!=
ent2B
->
getDirectMethods
().
end
();
++
i
)
{
{
if
(
!
valid
(
i
->
name
))
{
if
(
!
valid
(
i
->
name
))
{
std
::
cerr
std
::
cerr
<<
"interface type "
<<
name
<<
" direct method "
<<
"interface type "
<<
name
<<
" direct method "
<<
i
->
name
<<
" uses an invalid identifier"
<<
i
->
name
<<
" uses an invalid identifier"
...
@@ -1048,7 +1076,8 @@ void checkIds(
...
@@ -1048,7 +1076,8 @@ void checkIds(
j
(
i
->
parameters
.
begin
());
j
(
i
->
parameters
.
begin
());
j
!=
i
->
parameters
.
end
();
++
j
)
j
!=
i
->
parameters
.
end
();
++
j
)
{
{
if
(
!
valid
(
j
->
name
))
{
if
(
!
valid
(
j
->
name
))
{
std
::
cerr
std
::
cerr
<<
"interface type "
<<
name
<<
"interface type "
<<
name
<<
" direct method "
<<
i
->
name
<<
" parameter "
<<
" direct method "
<<
i
->
name
<<
" parameter "
...
@@ -1065,60 +1094,67 @@ void checkIds(
...
@@ -1065,60 +1094,67 @@ void checkIds(
case
unoidl
:
:
Entity
::
SORT_SERVICE_BASED_SINGLETON
:
case
unoidl
:
:
Entity
::
SORT_SERVICE_BASED_SINGLETON
:
break
;
break
;
case
unoidl
:
:
Entity
::
SORT_CONSTANT_GROUP
:
case
unoidl
:
:
Entity
::
SORT_CONSTANT_GROUP
:
{
{
rtl
::
Reference
<
unoidl
::
ConstantGroupEntity
>
ent2B
(
rtl
::
Reference
<
unoidl
::
ConstantGroupEntity
>
ent2B
(
static_cast
<
unoidl
::
ConstantGroupEntity
*>
(
entB
.
get
()));
static_cast
<
unoidl
::
ConstantGroupEntity
*>
(
entB
.
get
()));
for
(
std
::
vector
<
unoidl
::
ConstantGroupEntity
::
Member
>::
const_iterator
for
(
std
::
vector
<
unoidl
::
ConstantGroupEntity
::
Member
>::
const_iterator
i
(
ent2B
->
getMembers
().
begin
());
i
(
ent2B
->
getMembers
().
begin
());
i
!=
ent2B
->
getMembers
().
end
();
++
i
)
i
!=
ent2B
->
getMembers
().
end
();
++
i
)
{
bool
found
=
false
;
if
(
entA
.
is
())
{
{
bool
found
=
false
;
rtl
::
Reference
<
unoidl
::
ConstantGroupEntity
>
ent2A
(
if
(
entA
.
is
())
{
rtl
::
Reference
<
unoidl
::
ConstantGroupEntity
>
ent2A
(
static_cast
<
unoidl
::
ConstantGroupEntity
*>
(
static_cast
<
unoidl
::
ConstantGroupEntity
*>
(
entA
.
get
()));
entA
.
get
()));
for
(
std
::
vector
<
unoidl
::
ConstantGroupEntity
::
Member
>::
const_iterator
for
(
std
::
vector
<
unoidl
::
ConstantGroupEntity
::
Member
>::
const_iterator
j
(
ent2A
->
getMembers
().
begin
());
j
(
ent2A
->
getMembers
().
begin
());
j
!=
ent2A
->
getMembers
().
end
();
++
j
)
j
!=
ent2A
->
getMembers
().
end
();
++
j
)
{
if
(
i
->
name
==
j
->
name
)
{
{
if
(
i
->
name
==
j
->
name
)
{
found
=
true
;
found
=
true
;
break
;
break
;
}
}
}
}
}
if
(
!
(
found
||
valid
(
i
->
name
)))
{
std
::
cerr
<<
"Constant group "
<<
name
<<
" member "
<<
i
->
name
<<
" uses an invalid identifier"
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
}
break
;
if
(
!
(
found
||
valid
(
i
->
name
)))
{
std
::
cerr
<<
"Constant group "
<<
name
<<
" member "
<<
i
->
name
<<
" uses an invalid identifier"
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
}
}
}
break
;
}
case
unoidl
:
:
Entity
::
SORT_SINGLE_INTERFACE_BASED_SERVICE
:
case
unoidl
:
:
Entity
::
SORT_SINGLE_INTERFACE_BASED_SERVICE
:
if
(
!
entA
.
is
())
{
if
(
!
entA
.
is
())
{
rtl
::
Reference
<
unoidl
::
SingleInterfaceBasedServiceEntity
>
rtl
::
Reference
<
unoidl
::
SingleInterfaceBasedServiceEntity
>
ent2B
(
ent2B
(
static_cast
<
unoidl
::
SingleInterfaceBasedServiceEntity
*>
(
static_cast
<
unoidl
::
SingleInterfaceBasedServiceEntity
*>
(
entB
.
get
()));
entB
.
get
()));
for
(
std
::
vector
<
unoidl
::
SingleInterfaceBasedServiceEntity
::
Constructor
>::
const_iterator
for
(
std
::
vector
<
unoidl
::
SingleInterfaceBasedServiceEntity
::
Constructor
>::
const_iterator
i
(
ent2B
->
getConstructors
().
begin
());
i
(
ent2B
->
getConstructors
().
begin
());
i
!=
ent2B
->
getConstructors
().
end
();
++
i
)
i
!=
ent2B
->
getConstructors
().
end
();
++
i
)
{
{
if
(
!
valid
(
i
->
name
))
{
if
(
!
valid
(
i
->
name
))
{
std
::
cerr
std
::
cerr
<<
"single-interface--based service "
<<
name
<<
"single-interface--based service "
<<
name
<<
" constructor "
<<
i
->
name
<<
" constructor "
<<
i
->
name
<<
" uses an invalid identifier"
<<
std
::
endl
;
<<
" uses an invalid identifier"
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
for
(
std
::
vector
<
unoidl
::
SingleInterfaceBasedServiceEntity
::
Constructor
::
Parameter
>::
const_iterator
for
(
std
::
vector
<
unoidl
::
SingleInterfaceBasedServiceEntity
::
Constructor
::
Parameter
>::
const_iterator
j
(
i
->
parameters
.
begin
());
j
(
i
->
parameters
.
begin
());
j
!=
i
->
parameters
.
end
();
++
j
)
j
!=
i
->
parameters
.
end
();
++
j
)
{
{
if
(
!
valid
(
j
->
name
))
{
if
(
!
valid
(
j
->
name
))
{
std
::
cerr
std
::
cerr
<<
"single-interface--based service "
<<
name
<<
"single-interface--based service "
<<
name
<<
" constructor "
<<
i
->
name
<<
" parameter "
<<
" constructor "
<<
i
->
name
<<
" parameter "
...
@@ -1131,67 +1167,81 @@ void checkIds(
...
@@ -1131,67 +1167,81 @@ void checkIds(
}
}
break
;
break
;
case
unoidl
:
:
Entity
::
SORT_ACCUMULATION_BASED_SERVICE
:
case
unoidl
:
:
Entity
::
SORT_ACCUMULATION_BASED_SERVICE
:
{
{
rtl
::
Reference
<
unoidl
::
AccumulationBasedServiceEntity
>
ent2B
(
rtl
::
Reference
<
unoidl
::
AccumulationBasedServiceEntity
>
ent2B
(
static_cast
<
unoidl
::
AccumulationBasedServiceEntity
*>
(
static_cast
<
unoidl
::
AccumulationBasedServiceEntity
*>
(
entB
.
get
()));
entB
.
get
()));
std
::
vector
<
unoidl
::
AccumulationBasedServiceEntity
::
Property
>::
size_type
std
::
vector
<
unoidl
::
AccumulationBasedServiceEntity
::
Property
>::
size_type
n
(
entA
.
is
()
n
(
entA
.
is
()
?
?
(
static_cast
<
unoidl
::
AccumulationBasedServiceEntity
*>
(
(
static_cast
<
unoidl
::
AccumulationBasedServiceEntity
*>
(
entA
.
get
())
->
getDirectProperties
().
size
())
:
0
);
entA
.
get
())
assert
(
n
<=
ent2B
->
getDirectProperties
().
size
());
->
getDirectProperties
().
size
())
:
0
);
for
(
std
::
vector
<
unoidl
::
AccumulationBasedServiceEntity
::
Property
>::
const_iterator
assert
(
n
<=
ent2B
->
getDirectProperties
().
size
()
);
i
(
ent2B
->
getDirectProperties
().
begin
()
+
n
);
for
(
std
::
vector
<
unoidl
::
AccumulationBasedServiceEntity
::
Property
>::
const_iterator
i
!=
ent2B
->
getDirectProperties
().
end
();
++
i
)
i
(
ent2B
->
getDirectProperties
().
begin
()
+
n
);
{
i
!=
ent2B
->
getDirectProperties
().
end
();
++
i
)
if
(
!
valid
(
i
->
name
)
)
{
{
if
(
!
valid
(
i
->
name
))
{
std
::
cerr
std
::
cerr
<<
"accumulation-based service "
<<
name
<<
"accumulation-based service "
<<
name
<<
" direct property "
<<
i
->
name
<<
" direct property "
<<
i
->
name
<<
" uses an invalid identifier"
<<
" uses an invalid identifier"
<<
std
::
endl
;
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
}
break
;
}
}
break
;
}
}
}
}
}
}
}
}
}
SAL_IMPLEMENT_MAIN
()
{
SAL_IMPLEMENT_MAIN
()
try
{
{
try
{
sal_uInt32
args
=
rtl_getAppCommandArgCount
();
sal_uInt32
args
=
rtl_getAppCommandArgCount
();
rtl
::
Reference
<
unoidl
::
Manager
>
mgr
[
2
];
rtl
::
Reference
<
unoidl
::
Manager
>
mgr
[
2
];
mgr
[
0
]
=
new
unoidl
::
Manager
;
mgr
[
0
]
=
new
unoidl
::
Manager
;
mgr
[
1
]
=
new
unoidl
::
Manager
;
mgr
[
1
]
=
new
unoidl
::
Manager
;
rtl
::
Reference
<
unoidl
::
Provider
>
prov
[
2
];
rtl
::
Reference
<
unoidl
::
Provider
>
prov
[
2
];
int
side
=
0
;
int
side
=
0
;
for
(
sal_uInt32
i
=
0
;
i
!=
args
;
++
i
)
{
for
(
sal_uInt32
i
=
0
;
i
!=
args
;
++
i
)
{
bool
delimiter
=
false
;
bool
delimiter
=
false
;
OUString
uri
(
getArgumentUri
(
i
,
side
==
0
?
&
delimiter
:
0
));
OUString
uri
(
getArgumentUri
(
i
,
side
==
0
?
&
delimiter
:
0
));
if
(
delimiter
)
{
if
(
delimiter
)
{
side
=
1
;
side
=
1
;
}
else
{
}
try
{
else
{
try
{
prov
[
side
]
=
mgr
[
side
]
->
addProvider
(
uri
);
prov
[
side
]
=
mgr
[
side
]
->
addProvider
(
uri
);
}
catch
(
unoidl
::
NoSuchFileException
&
)
{
}
catch
(
unoidl
::
NoSuchFileException
&
)
{
std
::
cerr
std
::
cerr
<<
"Input <"
<<
uri
<<
"> does not exist"
<<
std
::
endl
;
<<
"Input <"
<<
uri
<<
"> does not exist"
<<
std
::
endl
;
std
::
exit
(
EXIT_FAILURE
);
std
::
exit
(
EXIT_FAILURE
);
}
}
}
}
}
}
if
(
side
==
0
||
!
(
prov
[
0
].
is
()
&&
prov
[
1
].
is
()))
{
if
(
side
==
0
||
!
(
prov
[
0
].
is
()
&&
prov
[
1
].
is
()))
{
badUsage
();
badUsage
();
}
}
checkMap
(
prov
[
1
],
""
,
prov
[
0
]
->
createRootCursor
());
checkMap
(
prov
[
1
],
""
,
prov
[
0
]
->
createRootCursor
());
checkIds
(
prov
[
0
],
""
,
prov
[
1
]
->
createRootCursor
());
checkIds
(
prov
[
0
],
""
,
prov
[
1
]
->
createRootCursor
());
return
EXIT_SUCCESS
;
return
EXIT_SUCCESS
;
}
catch
(
unoidl
::
FileFormatException
&
e1
)
{
}
catch
(
unoidl
::
FileFormatException
&
e1
)
{
std
::
cerr
std
::
cerr
<<
"Bad input <"
<<
e1
.
getUri
()
<<
">: "
<<
e1
.
getDetail
()
<<
"Bad input <"
<<
e1
.
getUri
()
<<
">: "
<<
e1
.
getDetail
()
<<
std
::
endl
;
<<
std
::
endl
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment