Logo Search packages:      
Sourcecode: odyssey version File versions

void PicDevice::list ( vector< string > *  v  )  [static]

Gets a list of the available PIC devices.

Parameters:
v A vector of strings to which the device names are added.
Postcondition:
The PIC device types are added to the vector v. Any devices that have not been tested or are experimental are prefixed with an asterisk.

Definition at line 33 of file PicDevice.cxx.

References ConfigFile::get_boolean(), ConfigFile::get_sections(), and Device::name.

                                      {
      vector<string> pics;
      bool experimental;

      if(pic_config == NULL)
            pic_config = new ConfigFile("pic.conf", PACKAGE, DATADIR "/pic.conf");

      pics = pic_config->get_sections();
      for(unsigned long i=0; i < pics.size(); i++) {
            string name = pics[i];

            if(! pic_config->get_boolean(name, "experimental", &experimental)) {
                  experimental = false;
            }
            if(experimental) name.insert(0, "*");
            v->push_back(name);
      }
}


Generated by  Doxygen 1.6.0   Back to index