summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-04-09 17:39:04 +0000
committerMarc Laukien <marc@zeroc.com>2002-04-09 17:39:04 +0000
commit57c7d83e67c2663828e086ab096937b772886073 (patch)
treeec2a306fc70a037ab4bd4c65169c00325dd8fba3 /cpp/src
parentFix network error. (diff)
downloadice-57c7d83e67c2663828e086ab096937b772886073.tar.bz2
ice-57c7d83e67c2663828e086ab096937b772886073.tar.xz
ice-57c7d83e67c2663828e086ab096937b772886073.zip
fixed hyperlink problem
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Endpoint.cpp24
-rw-r--r--cpp/src/Slice/Parser.cpp33
-rw-r--r--cpp/src/slice2docbook/Gen.cpp51
3 files changed, 69 insertions, 39 deletions
diff --git a/cpp/src/Ice/Endpoint.cpp b/cpp/src/Ice/Endpoint.cpp
index cc56e7e73ed..230c8b52f05 100644
--- a/cpp/src/Ice/Endpoint.cpp
+++ b/cpp/src/Ice/Endpoint.cpp
@@ -520,8 +520,8 @@ IceInternal::TcpEndpoint::operator==(const Endpoint& r) const
//
struct sockaddr_in laddr;
struct sockaddr_in raddr;
- getAddress(_host.c_str(), _port, laddr);
- getAddress(p->_host.c_str(), p->_port, raddr);
+ getAddress(_host, _port, laddr);
+ getAddress(p->_host, p->_port, raddr);
return compareAddress(laddr, raddr);
}
@@ -588,8 +588,8 @@ IceInternal::TcpEndpoint::operator<(const Endpoint& r) const
//
struct sockaddr_in laddr;
struct sockaddr_in raddr;
- getAddress(_host.c_str(), _port, laddr);
- getAddress(p->_host.c_str(), p->_port, raddr);
+ getAddress(_host, _port, laddr);
+ getAddress(p->_host, p->_port, raddr);
if (laddr.sin_addr.s_addr < raddr.sin_addr.s_addr)
{
return true;
@@ -852,8 +852,8 @@ IceInternal::SslEndpoint::operator==(const Endpoint& r) const
//
struct sockaddr_in laddr;
struct sockaddr_in raddr;
- getAddress(_host.c_str(), _port, laddr);
- getAddress(p->_host.c_str(), p->_port, raddr);
+ getAddress(_host, _port, laddr);
+ getAddress(p->_host, p->_port, raddr);
return compareAddress(laddr, raddr);
}
@@ -920,8 +920,8 @@ IceInternal::SslEndpoint::operator<(const Endpoint& r) const
//
struct sockaddr_in laddr;
struct sockaddr_in raddr;
- getAddress(_host.c_str(), _port, laddr);
- getAddress(p->_host.c_str(), p->_port, raddr);
+ getAddress(_host, _port, laddr);
+ getAddress(p->_host, p->_port, raddr);
if (laddr.sin_addr.s_addr < raddr.sin_addr.s_addr)
{
return true;
@@ -1179,8 +1179,8 @@ IceInternal::UdpEndpoint::operator==(const Endpoint& r) const
//
struct sockaddr_in laddr;
struct sockaddr_in raddr;
- getAddress(_host.c_str(), _port, laddr);
- getAddress(p->_host.c_str(), p->_port, raddr);
+ getAddress(_host, _port, laddr);
+ getAddress(p->_host, p->_port, raddr);
return compareAddress(laddr, raddr);
}
@@ -1247,8 +1247,8 @@ IceInternal::UdpEndpoint::operator<(const Endpoint& r) const
//
struct sockaddr_in laddr;
struct sockaddr_in raddr;
- getAddress(_host.c_str(), _port, laddr);
- getAddress(p->_host.c_str(), p->_port, raddr);
+ getAddress(_host, _port, laddr);
+ getAddress(p->_host, p->_port, raddr);
if (laddr.sin_addr.s_addr < raddr.sin_addr.s_addr)
{
return true;
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index 156a44a2c94..2a4464349c4 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -118,6 +118,18 @@ Slice::Contained::comment()
return _comment;
}
+int
+Slice::Contained::includeLevel()
+{
+ return _includeLevel;
+}
+
+void
+Slice::Contained::updateIncludeLevel()
+{
+ _includeLevel = min(_includeLevel, _unit->currentIncludeLevel());
+}
+
list<string>
Slice::Contained::getMetaData()
{
@@ -157,6 +169,7 @@ Slice::Contained::Contained(const ContainerPtr& container, const string& name) :
_unit->addContent(this);
_file = _unit->currentFile();
_comment = _unit->currentComment();
+ _includeLevel = _unit->currentIncludeLevel();
}
// ----------------------------------------------------------------------
@@ -900,18 +913,6 @@ Slice::Container::enums()
return result;
}
-int
-Slice::Container::includeLevel()
-{
- return _includeLevel;
-}
-
-void
-Slice::Container::updateIncludeLevel()
-{
- _includeLevel = min(_includeLevel, _unit->currentIncludeLevel());
-}
-
bool
Slice::Container::hasProxies()
{
@@ -1103,14 +1104,6 @@ Slice::Container::containerRecDependencies(set<ConstructedPtr>& dependencies)
Slice::Container::Container(const UnitPtr& unit) :
SyntaxTreeBase(unit)
{
- if (_unit)
- {
- _includeLevel = _unit->currentIncludeLevel();
- }
- else
- {
- _includeLevel = 0;
- }
}
bool
diff --git a/cpp/src/slice2docbook/Gen.cpp b/cpp/src/slice2docbook/Gen.cpp
index ac60c5190d0..153c26fb9a5 100644
--- a/cpp/src/slice2docbook/Gen.cpp
+++ b/cpp/src/slice2docbook/Gen.cpp
@@ -117,6 +117,9 @@ void
Slice::Gen::visitContainer(const ContainerPtr& p)
{
ModuleList modules = p->modules();
+ modules.erase(remove_if(modules.begin(), modules.end(), ::IceUtil::memFun(&Contained::includeLevel)),
+ modules.end());
+
if (!modules.empty())
{
start("section", "Module Index");
@@ -137,13 +140,16 @@ Slice::Gen::visitContainer(const ContainerPtr& p)
}
ClassList classesAndInterfaces = p->classes();
+ classesAndInterfaces.erase(remove_if(classesAndInterfaces.begin(), classesAndInterfaces.end(),
+ ::IceUtil::memFun(&Contained::includeLevel)),
+ classesAndInterfaces.end());
ClassList classes;
ClassList interfaces;
remove_copy_if(classesAndInterfaces.begin(), classesAndInterfaces.end(), back_inserter(classes),
::IceUtil::memFun(&ClassDef::isInterface));
remove_copy_if(classesAndInterfaces.begin(), classesAndInterfaces.end(), back_inserter(interfaces),
not1(::IceUtil::memFun(&ClassDef::isInterface)));
-
+
if (!classes.empty())
{
start("section", "Class Index");
@@ -183,6 +189,9 @@ Slice::Gen::visitContainer(const ContainerPtr& p)
}
ExceptionList exceptions = p->exceptions();
+ exceptions.erase(remove_if(exceptions.begin(), exceptions.end(), ::IceUtil::memFun(&Contained::includeLevel)),
+ exceptions.end());
+
if (!exceptions.empty())
{
start("section", "Exception Index");
@@ -203,6 +212,9 @@ Slice::Gen::visitContainer(const ContainerPtr& p)
}
StructList structs = p->structs();
+ structs.erase(remove_if(structs.begin(), structs.end(), ::IceUtil::memFun(&Contained::includeLevel)),
+ structs.end());
+
if (!structs.empty())
{
start("section", "Struct Index");
@@ -223,6 +235,9 @@ Slice::Gen::visitContainer(const ContainerPtr& p)
}
SequenceList sequences = p->sequences();
+ sequences.erase(remove_if(sequences.begin(), sequences.end(), ::IceUtil::memFun(&Contained::includeLevel)),
+ sequences.end());
+
if (!sequences.empty())
{
start("section", "Sequence Index");
@@ -243,6 +258,10 @@ Slice::Gen::visitContainer(const ContainerPtr& p)
}
DictionaryList dictionaries = p->dictionaries();
+ dictionaries.erase(remove_if(dictionaries.begin(), dictionaries.end(),
+ ::IceUtil::memFun(&Contained::includeLevel)),
+ dictionaries.end());
+
if (!dictionaries.empty())
{
start("section", "Dictionary Index");
@@ -263,6 +282,9 @@ Slice::Gen::visitContainer(const ContainerPtr& p)
}
EnumList enums = p->enums();
+ enums.erase(remove_if(enums.begin(), enums.end(), ::IceUtil::memFun(&Contained::includeLevel)),
+ enums.end());
+
if (!enums.empty())
{
start("section", "Enum Index");
@@ -1159,7 +1181,10 @@ Slice::Gen::toString(const SyntaxTreeBasePtr& p, const ContainerPtr& container)
ProxyPtr proxy = ProxyPtr::dynamicCast(p);
if (proxy)
{
- linkend = containedToId(proxy->_class());
+ if (proxy->_class()->includeLevel() == 0)
+ {
+ linkend = containedToId(proxy->_class());
+ }
s = getScopedMinimized(proxy->_class(), container);
s += "*";
tag = "classname";
@@ -1173,7 +1198,7 @@ Slice::Gen::toString(const SyntaxTreeBasePtr& p, const ContainerPtr& container)
// declaration, provided that a definition is available.
//
ContainedPtr definition = cl->definition();
- if (definition)
+ if (definition && definition->includeLevel() == 0)
{
linkend = containedToId(definition);
}
@@ -1184,7 +1209,10 @@ Slice::Gen::toString(const SyntaxTreeBasePtr& p, const ContainerPtr& container)
ExceptionPtr ex = ExceptionPtr::dynamicCast(p);
if (ex)
{
- linkend = containedToId(ex);
+ if (ex->includeLevel() == 0)
+ {
+ linkend = containedToId(ex);
+ }
s = getScopedMinimized(ex, container);
tag = "classname";
}
@@ -1192,7 +1220,10 @@ Slice::Gen::toString(const SyntaxTreeBasePtr& p, const ContainerPtr& container)
StructPtr st = StructPtr::dynamicCast(p);
if (st)
{
- linkend = containedToId(st);
+ if (st->includeLevel() == 0)
+ {
+ linkend = containedToId(st);
+ }
s = getScopedMinimized(st, container);
tag = "structname";
}
@@ -1200,7 +1231,10 @@ Slice::Gen::toString(const SyntaxTreeBasePtr& p, const ContainerPtr& container)
EnumeratorPtr en = EnumeratorPtr::dynamicCast(p);
if (en)
{
- linkend = containedToId(en);
+ if (en->includeLevel() == 0)
+ {
+ linkend = containedToId(en);
+ }
s = getScopedMinimized(en, container);
tag = "constant";
}
@@ -1209,7 +1243,10 @@ Slice::Gen::toString(const SyntaxTreeBasePtr& p, const ContainerPtr& container)
{
ContainedPtr contained = ContainedPtr::dynamicCast(p);
assert(contained);
- linkend = containedToId(contained);
+ if (contained->includeLevel() == 0)
+ {
+ linkend = containedToId(contained);
+ }
s = getScopedMinimized(contained, container);
tag = "type";
}