Back to index

im-sdk  12.3.91
Public Member Functions | Private Attributes
IMLanguageList Class Reference

#include <IMLanguageList.hh>

Collaboration diagram for IMLanguageList:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 IMLanguageList ()
 IMLanguageList (CompoundString)
 ~IMLanguageList ()
void add (CompoundString)
IMLanguageListoperator= (const IMLanguageList &)
int count () const
CompoundStringgetLang (unsigned int index) const

Private Attributes

IMList< CompoundStringlanguage_list

Detailed Description

Definition at line 48 of file IMLanguageList.hh.


Constructor & Destructor Documentation

Definition at line 50 of file IMLanguageList.hh.

{}

Definition at line 44 of file IMLanguageList.cpp.

                                                   {
  add(alang);
}

Here is the call graph for this function:

Definition at line 48 of file IMLanguageList.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 74 of file IMLanguageList.cpp.

                                        {
  char *str;

  if (alang.compare("ja", 2))
    str = (char*)"ja";
  else if (alang.compare("ko", 2))
    str = (char*)"ko";
  else if (alang.compare("zh_TW", 5))
    str = (char*)"zh_TW";
  else if (alang.compare("zh_HK", 5))
    str = (char*)"zh_HK";
  else if (alang.compare("zh", 2))
    str = (char*)"zh_CN";
  else
              str = (char *)alang;

  for(int i=1;i<=count();i++){
    CompoundString lang = getLang(i);
    if(lang.compare(str)){
      // duplicated
      return;
    }
  }

  CompoundString *item = new CompoundString(str);
  language_list.addItem(item);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int IMLanguageList::count ( ) const

Definition at line 64 of file IMLanguageList.cpp.

                            {
  return language_list.getSize();
}

Here is the call graph for this function:

Here is the caller graph for this function:

CompoundString & IMLanguageList::getLang ( unsigned int  index) const

Definition at line 69 of file IMLanguageList.cpp.

                                                {
  return language_list.getItem(index);
}

Here is the call graph for this function:

Here is the caller graph for this function:

IMLanguageList & IMLanguageList::operator= ( const IMLanguageList a)

Definition at line 53 of file IMLanguageList.cpp.

                                                 {
  language_list.destroy();
  int n = a.count();
  for (int i = 1; i <= n; i++) {
    CompoundString langp = a.getLang(i);
    add(langp);
  }
  return *this;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 58 of file IMLanguageList.hh.


The documentation for this class was generated from the following files: