当前位置: 首页>>代码示例>>C++>>正文


C++ WrapperStr::lower方法代码示例

本文整理汇总了C++中WrapperStr::lower方法的典型用法代码示例。如果您正苦于以下问题:C++ WrapperStr::lower方法的具体用法?C++ WrapperStr::lower怎么用?C++ WrapperStr::lower使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WrapperStr的用法示例。


在下文中一共展示了WrapperStr::lower方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: compute_name

WrapperStr UmlOperation::compute_name()
{
    WrapperStr get_set_spec = javaNameSpec();

    if (! get_set_spec.isEmpty()) {
        UmlClassMember * it;

        if ((it = getOf()) == 0)
            it = setOf();

        int index;
        WrapperStr s = (it->kind() == aRelation)
                      ? ((UmlRelation *) it)->roleName()
                      : it->name();

        if ((index = get_set_spec.find("${name}")) != -1)
            get_set_spec.replace(index, 7, s);
        else if ((index = get_set_spec.find("${Name}")) != -1)
            get_set_spec.replace(index, 7, capitalize(s));
        else if ((index = s.find("${NAME}")) != -1)
            get_set_spec.replace(index, 7, s.upper());
        else if ((index = s.find("${nAME}")) != -1)
            get_set_spec.replace(index, 7, s.lower());

        return get_set_spec;
    }
    else
        return name();
}
开发者ID:jeremysalwen,项目名称:douml,代码行数:29,代码来源:UmlOperation.cpp

示例2: reverse_file

void Package::reverse_file(WrapperStr path, WrapperStr name)
{
    if (! Lex::open(path)) {
        // very strange !
        if (! scan)
            UmlCom::trace(WrapperStr("<font face=helvetica><b>cannot open <i>")
                          + path + "</i></b></font><br>");
    }
    else {
        UmlArtifact * art = 0;
        WrapperStr file_start;
        WrapperStr file_end;

        UmlCom::message(((scan) ? "scan " : "reverse ") + path);

        // go after <?[php]
        Lex::mark();

        bool redo;
        bool before_class;

        do {
            redo = FALSE;
            before_class = TRUE;

            WrapperStr s;
            char c = Lex::read_word_bis();

            while (c != 0) {
                if (c == '<') {
                    c = Lex::read_word_bis();

                    if (c == '?') {
                        if (!scan) file_start = Lex::region();

                        s = Lex::read_word();

                        if (s.lower() == "php") {
                            if (!scan) file_start = Lex::region();

                            s = Lex::read_word();
                        }

                        break;
                    }
                }
                else
                    c = Lex::read_word_bis();
            }

            aVisibility visibility = PackageVisibility;
            bool abstractp = FALSE;
            bool finalp = FALSE;
            bool inside_namespace_brace = FALSE;

            while (!s.isEmpty()) {
                if ((s == "class") || (s == "interface")) {
#ifdef REVERSE

                    if (!scan && (art == 0)) {
                        UmlPackage * pack = get_uml(TRUE);

                        if ((art = UmlBaseArtifact::create(pack->get_deploymentview(Namespace::current()), name)) == 0) {
                            UmlCom::trace(WrapperStr("<font face=helvetica><b>cannot create<i> artifact ")
                                          + name + "</i></b></font><br>");
                            Namespace::exit();
                            Lex::close();
                            return;
                        }

                        art->set_Stereotype("source");
                    }

#endif

                    if (!Class::reverse(this, s, abstractp, finalp, path, art))
                        break;

                    visibility = PackageVisibility;
                    abstractp = FALSE;
                    finalp = FALSE;

                    before_class = FALSE;
                    Lex::mark();
                }
                else if (s == "public")
                    visibility = PublicVisibility;
                else if (s == "protected")
                    visibility = ProtectedVisibility;
                else if (s == "private")
                    visibility = PrivateVisibility;
                else if (s == "final")
                    finalp = TRUE;
                else if (s == "abstract")
                    abstractp = TRUE;
                else if ((s == "namespace") && before_class) {
                    Namespace::exit();

                    s = Lex::read_word();

//.........这里部分代码省略.........
开发者ID:jeremysalwen,项目名称:douml,代码行数:101,代码来源:Package.cpp


注:本文中的WrapperStr::lower方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。