text:
audit oversight board
Capital Markets and Services Act 2007
Securities Commission Malaysia Act 1993
Securities Industry (Central Depositories) Act 1991
Demutualisation (Kuala Lumpur Stock Exchange) Act 2003 (pdf)
Securities Industry Act 1983
Futures Industry Act 1993
Regulatory FAQs
Consultation Papers
Remuneration Survey of Directors and Employees of Listed Issuers
Islamic Capital Market
INVESTOR EMPOWERMENT
InvestSmart
Capital Market Service Related Complaints
Complaints on SC Employee
List of Unauthorised Websites/Investment Products/Companies/Individuals
Bonds & Sukuk Market
ECF/P2P
Fund Management & Products
Common Reporting Platform (XBRL)
Media Releases and Announcements
InvestSmart Series 2017
Edumercials for Investor Affairs
Investor Education Radio Series On BFM 89.9
Announcements, Documents & Disclosure by Unlisted Public Companies
Prospectus Exposure
Funds (Expedited Authorisation)
Procurement Notice
About the SC
Management Directory
Student Open Day
NEED SOMETHING? ASK ALISS.
Type your keywords here
Launch of "The Evolving Business of Asset Management" A Report by The Institute of Capital Market Research Malaysia and Nomura Institute of Capital Market Research
20 June 2019 | By : Datuk Syed Zaid Albar, Chairman, Securities Commission Malaysia
Keynote Address by Datuk Syed Zaid Albar
Chairman of Securities Commission Malaysia
at the Launch of "The Evolving Business of Asset Management"
A Report by The Institute of Capital Markets Research Malaysia
and Nomura Institute of Capital Market Research
in Kuala Lumpur on Thursday, 20 June 2019
Professor Mohamed Ariff Syed Mohamed,
Member of the Board of the Institute for Capital Market Research Malaysia;
Mr Toshiyasu Iiyama, Senior Managing Director,
Head of China Committee, Nomura Holdings;
Distinguished guests, ladies and gentlemen.
A very good morning to everyone.
1. It is a pleasure for me to be here for the launch of "The Evolving Business of Asset Management". This report arose from a collaboration between the Institute for Capital Market Research Malaysia and the Nomura Institute for Capital Market Research, and I thank both organisations for their kind invitation.
2. In February 2018, Securities Commission Malaysia announced the establishment of an independent think-tank to focus on issues relating to capital market development. This initiative was borne out of an initial concept presented to the Board of the Capital Market Development Fund, and their subsequent support has paved the way for the incorporation of ICMR.
3. At first glance, developmental research may not appear to be an intuitive endeavour for a securities regulator. However, we must remember that public institutions can play a key role not only in maintaining order and preventing crises, but also in charting a holistic and sustainable development path. This is particularly relevant in the context of Malaysia's status as an emerging market economy.
4. Indeed, the philosophy of "growth with governance" – which, incidentally, is also the theme of the second Capital Market Masterplan – is embodied in the laws from which the SC draws its powers, giving rise to our statutory mandate to regulate and develop the Malaysian capital market.
The need for a shared developmental prerogative
5. In line with this mandate, the SC has pursued a broad spectrum of initiatives to drive the development of the Malaysian capital market. These initiatives aimed to diversify our range of intermediaries, asset classes as well as investment products and services, while also deepening existing segments of the market.
6. At the same time, SC's concurrent efforts on the regulatory front drove home the importance of transparency, governance and good conduct among market participants. This resulted in a fair, orderly and trusted market which provides a conducive environment for the earlier-mentioned initiatives to flourish.
7. These efforts have helped to drive the expansion of the Malaysian capital market, which was valued at RM3.19 trillion as at end-April 2019. Businesses' ability to obtain long-dated financing through the equity, bond and sukuk markets has promoted capital formation, and Malaysia also emerged as a global leader in the Islamic capital market while continuing to push for greater innovation in this area.
8. However, for Malaysia to defy structural challenges and emerge as an Accessible, Agile and Accountable capital market, it is clear that development must become a shared prerogative between SC and the private sector. The SC's developmental role should therefore evolve from a deeply-involved architect to a vigilant but innovation-friendly facilitator.
9. If that sounded trite, I can assure you that it was not a recent realisation on the SC's part. As someone who came from the private sector, over the last few years I could discern the gradual yet deliberate progress that the SC has made in this direction, and I appreciate the challenges involved in striking the delicate balance between promoting growth and safeguarding market integrity.
10. Nevertheless, to cultivate a more vibrant and responsive market, it is crucial for policies to be thoughtful, evidence-based, and informed by the widest possible range of stakeholders. Cultivating such diversity of insights requires an objective platform where stakeholders can explore ideas and collaborate in advancing the development agenda. Such a platform will enable Malaysia to reap the benefits of a network economy, where knowledge-sharing and effective partnerships can transcend traditional organisational boundaries, thus generating synergies.
Synthesising perspectives, informing policies
11. The ICMR was borne out of this vision. As an independent entity, ICMR was set up to be a catalyst for information sharing and dialogue. With a structure aligned with the Triple Helix innovation model, ICMR not only establishes a tripartite relationship among policymakers, the industry and academia, but also serves as a clearing house for perspectives from these groups of stakeholders.
12. In conducting its research, ICMR leverages on a huge trove of data and past academic literature, thus adopting the academic world's ethos of "standing on the shoulders of giants." This knowledge is further enriched by incorporating practical insights and lessons learned from the experience of local industry players.
13 Collaboration is another important tenet, and ICMR's independence enables it to benefit from a network of existing local and global partner institutions. Today, we would like to express our deepest appreciation to the Nomura Institute for Capital Market Research (NICMR), a key knowledge partner, as well as their academic advisor, Professor Dr Catherine Ho from Universiti Teknologi Mara (UiTM), whose contributions have been instrumental in the preparation of this report.
14. Much like ICMR, NICMR was set up to provide neutral and independent research on structural issues relating to the capital market, with particular emphasis in Japan but also other key markets like the US and Singapore. NICMR is renowned globally for its deep and comprehensive expertise in key areas of the pensions industry, asset management as well as asset formation. Their perspectives and recommendations therefore have been invaluable in shaping the insights and analyses contained in today's report.
15. To build on this successful collaboration, ICMR will further augment its collaboration capabilities by attracting prominent international and domestic experts – be it from the industry, public sector or academia – through the establishment of a distinguished research and visiting fellows programme.
Shining a light on the asset management industry
16 The value of ICMR's collaborative research model is exemplified by the depth and rigor of this report. In addition to key lessons from Japan provided by NICMR, the proprietary survey conducted by ICMR provides a comprehensive assessment of major issues faced by asset managers in Malaysia, and their level of preparedness in facing these challenges.
17. The focus on the asset management industry is timely. Over the last 20 years, the industry has recorded strong growth with a compound annual growth rate of 16%. However, data from the last five years suggest that it might have reached an inflection point with signs pointing to slowing future growth. Concerns over the growth trajectory were also given impetus as industry shortcomings were increasingly raised by investors and industry players themselves.
18. From a business environment lens, this report also recognises that the industry must contend with structural shifts which are reshaping the very nature of asset management. Such shifts include changing demographic trends and investor preferences; digitalisation; the availability of appropriately-skilled talent, as well as market structure and regulations.
19. By bringing these issues and challenges to the fore, today's report has helped to shine a light on areas that must be addressed as a matter of priority – both by policymakers as well as the private sector. On our part, the SC is committed to review the recommendations provided in its report and effect the necessary improvements. At the same time, I hope that the private sector will also proactively seek to enrich their respective strategies with the insights contained in this report, so we may advance the industry together in a cohesive endeavour.
20. Moving forward, the SC aspires for independent research to play a much greater role in shaping the development of the capital market, and we will continue to provide the necessary support for ICMR in its mission to build a robust body of high-quality, independent research.
21. On that note, I wish to congratulate ICMR for their hard work and effort in preparing this report and I look forward to the subsequent discussions.
HOTLINE: +603-6204 8000
QUESTION? ASK SC
© Copyright Securities Commission Malaysia | Contact Us | Disclaimer | The site is best viewed using Internet Explorer 11 and Google Chrome with mimimum resolution of 1280x1024
Generic Popup

redpajama_set_name: RedPajamaCommonCrawl


text:
Geology, Geophysics, and Geochemistry Science Center
Spectroscopy and Hyperspectral Imaging of Critical Mineral Resources Completed
By Geology, Geophysics, and Geochemistry Science Center September 30, 2022
Our project will characterize the primary critical minerals (minerals that contain critical elements in their base structure) that are not yet in the USGS Spectral Library. We propose to increase understanding of the spectral indicators of critical minerals using lab-based studies of hand specimens and drill core, hyperspectral field scanning, and hyperspectral images collected from aircraft.
Scientific Issue and Relevance
Critical minerals are essential to National security and economic prosperity of the United States. The U.S. relies heavily on imports of critical minerals, making us vulnerable to natural and foreign events that disrupt our supply chain. In response to the Presidential executive order on a federal strategy to ensure secure and reliable supplies of critical minerals, we will apply cutting edge hyperspectral imaging technology to study critical mineral deposits and the geologic settings in which they are found. By measuring the absorption of light as a function of wavelength, spectrometers can identify minerals and chemical variations in minerals. Imaging spectrometers, commonly known as hyperspectral imagers, can map the distributions of minerals and variations in mineral chemistry at laboratory, field, and aircraft spatial scale.
Sources/Usage: Public Domain.
Raymond Kokaly (USGS research geophysicist) conducting ground-based hyperspectral imaging ofhydrothermally-altered rock at Cuprite, NV.
Methods to Address Issue
This project proposes to increase our understanding of the spectral indicators of critical minerals using lab-based studies of hand specimens and drill core, hyperspectral field scanning of outcrop and mine pit walls, and hyperspectral images collected from aircraft over focal sites and regional areas. Objectives are to:
Identify spectral indicators of critical mineral ores and associated mineralogy
Apply laboratory-, field-, and aircraft-based hyperspectral imaging to studying critical minerals
Focal studies on rare earth elements (REEs) and lithium (Li)-bearing clays
Publish critical mineral-related spectra and hyperspectral images
Create regional mineral maps in the southwestern U.S.
Spectral Investigation of Critical Mineral Ores: Concentrate on collecting and interpreting imaging spectroscopy data of the USGS Historic Ore Collection (which contains over 1700 primary ores from historic mining districts), pure mineral samples, and selected field samples in support of other Mineral Resources Program science projects. Results will provide the fundamental research essential for future laboratory, field and airborne imaging spectroscopy investigations.
Spectroscopy of Lithium-bearing Clays and REE-bearing Minerals: Most Li-bearing clays in the U.S. require expensive roasting for liberation from octahedral layers. Li in the interlayer sites can be leached at a lower cost, potentially increasing the number of economically viable Li deposits in the U.S. Recent work with vermiculites suggests reflectance spectroscopy might determine where Li resides in clays (octahedral vs. interlayer sites). Initial work will involve enriching vermiculite and montmorillonite clay with Li and defining the spectral changes caused by enrichment with interlayer Li. While initially lab-based, if results indicate an interlayer Li spectral signature, available hyperspectral images from related mineral resources science projects will be analyzed.
Airborne Hyperspectral Imaging of Critical Minerals and Mineral Resources: Most existing hyperspectral datasets and surface mineral maps for the U.S. are limited in geographic scope to small areas less than 100 km2. Building on methods developed for hyperspectral imaging of Afghanistan, we will utilize recent collections and existing publicly-available archives of hyperspectral data to prepare regional mineral maps in the southwestern U.S. for mineral resource studies and focused studies.
Return to Mineral Resources Program | Geology, Geophysics, and Geochemistry Science Center
Raymond Kokaly
Research Geophysicist
Spectroscopy Lab
raymond@usgs.gov
Gregg A Swayze, Ph.D.
Scientist Emeritus
gswayze@usgs.gov
Todd Hoefen
Geophysicist
thoefen@usgs.gov
K. Eric Livo (Former Employee)
Research Geologist
Geologic Mapping
Hyperspectral Imaging
Undiscovered Resources
Field Calibrations
Mine Wastes
Mineral Characterization
Mineral Mapping
Rare-Earth Element Mapping
Mineral Resource Formation
Rare Earth Elements (REE)
Spectroscopy Applications
Critical Mineral Resources
Regional Studies and Mineral Resources
Secretarial Order 3359
imaging spectroscopy
Below are other science projects associated with this project.
Hyperspectral Imaging of Mineral Resources from New and Old Origins: Minerals for the Nation's Economy and Utilization of Legacy Mine Lands
This project will produce maps of surface mineralogy at 15 m spatial resolution covering the largest contiguous area of hyperspectral imagery that has ever been assembled for the U.S., over 380,000 sq. km. in California and Nevada. We are developing new methods to apply these data to map critical minerals, including minerals critical for battery fabrication, and to evaluate resources available...
Mineral Resources Program, Geology, Energy & Minerals Science Center, Geology, Geophysics, and Geochemistry Science Center, Spectroscopy Lab
Multi-scale Screening Techniques for Legacy Mine Land (LML) Sites Using Data Mining and Site-specific Studies in the Western U.S.
The main goal of this project is to provide a science-based approach for screening legacy mine land (LML) sites for remediation and identifying watersheds where relatively low-cost restoration efforts may yield substantial improvements to stream water quality. We are combing analysis of multiple existing regional data coverages with focused field studies to develop a protocol that land managers...
Mineral Resources Program, Geology, Geophysics, and Geochemistry Science Center
Spectral Characteristics and Mapping of Lithium-rich Playas for Use in Western U.S. Basin and Range Mineral Assessment of Lithium
Project objectives are to compile and examine mineral maps of the known lithium-bearing playas in the U.S., Chile, and Argentina using field and remote sensing data to better understand the mineralogy of these deposits. After mineral assemblages are identified, mineral maps for lithium-rich plays will be compiled using ASTER data.
Mineral Resources Program, Geology, Energy & Minerals Science Center
Lithium from Source to Sink: Genesis and Evolution of Li Brines and Clays
The purpose of this project is to trace the lithium (Li) geochemical cycle in the Great Basin, with an emphasis on the pathways that lead to the development of lithium clay and brine resources.
Mineral Resources Program, Geology, Geophysics, and Geochemistry Science Center, Geology, Minerals, Energy, and Geophysics Science Center
Systems Approach to Critical Minerals Inventory, Research, and Assessment
This project supports the Earth Mapping Resources Initiative (EarthMRI) by developing a mineral systems approach for defining focus areas. This project is investigating domestic sources of critical minerals in three sequential stages: inventory, research, and assessment. 1) Inventory the abundance of critical minerals in ore, minerals, and processed materials from major deposits in each system...
Development and Validation of Hyperspectral Imager for Field and Lab Scanning
The Mineral Resources Program has advanced methods of imaging spectroscopy (hyperspectral remote sensing) that are now used routinely by the earth science and remote sensing communities for mineral mapping, soil quality mapping, hazard mitigation, and other terrestrial and planetary applications. The USGS is highly qualified to advance this technology based on its world class expertise in mineral...
Mineral Resources Program, Geology, Geophysics, and Geochemistry Science Center, Spectroscopy Lab
Denver Microbeam Laboratory: Mineral Resources Research Support
The USGS Denver Microbeam Laboratory provides chemical analysis and characterization of rocks, minerals, and environmental samples in support of a wide variety of USGS projects related to mineral resources, including research projects funded by the USGS Mineral Resources Program. The research applications for these projects range from mineral resource research and assessments, to geologic mapping...
Mineral Resources Program, Geology, Geophysics, and Geochemistry Science Center, Denver Microbeam Laboratory
USGS High Resolution Spectral Library
The USGS Spectral Library contains reflectance spectra, including samples of minerals, rocks, soils, physically constructed as well as mathematically computed mixtures, plants, vegetation communities, microorganisms, and man-made materials. The samples and spectra collected were assembled for the purpose of using spectral features for the remote detection of these and similar materials. The latest...
Below are publications associated with this project.
Evaluation of SWIR crop residue bands for the Landsat Next mission
This research reports the findings of a Landsat Next expert review panel that evaluated the use of narrow shortwave infrared (SWIR) reflectance bands to measure ligno-cellulose absorption features centered near 2100 and 2300 nm, with the objective of measuring and mapping non-photosynthetic vegetation (NPV), crop residue cover, and the adoption of conservation tillage practices within agricultural
Western Geographic Science Center, Lower Mississippi-Gulf Water Science Center
Mineral Mapping of the Battle Mountain District, Nevada, USA, Using AVIRIS-Classic and SpecTIR Inc. AisaFENIX 1K Imaging Spectrometer Datasets
Imaging spectroscopy (hyperspectral imaging) has been used to successfully map minerals at the outcrop, deposit, district, and regional scale. This contribution presents spectral-based mineral maps of the Battle Mountain mining district, Nevada, USA, generated using multi-scale airborne imaging and ground-based point spectrometers. Airborne Visible/Infrared Imaging Spectrometer (AVIRIS) and AisaFE
Quantifying uncertainty for remote spectroscopy of surface composition
Remote surface measurements by imaging spectrometers play an important role in planetary and Earth science. To make these measurements, investigators calibrate instrument data to absolute units, invert physical models to estimate atmospheric effects, and then determine surface properties from the spectral reflectance. This study quantifies the uncertainty in this process. Global missions demand pr
Geology, Geophysics, and Geochemistry Science Center, Spectroscopy Lab
Dust deposited on snow cover in the San Juan Mountains, Colorado, 2011-2016: Compositional variability bearing on snow-melt effects
Light-absorbing particles in atmospheric dust deposited on snow cover (dust-on-snow, DOS) diminish albedo and accelerate the timing and rate of snow melt. Identification of these particles and their effects are relevant to snow-radiation modeling and thus water-resource management. Laboratory-measured reflectance of DOS samples from the San Juan Mountains (USA) were compared with DOS mass loading,
Climate Research and Development Program, Land Change Science Program, Geology, Geophysics, and Geochemistry Science Center, Geosciences and Environmental Change Science Center, Spectroscopy Lab
Classification of oil spill by thicknesses using multiple remote sensors
Satellite Synthetic Aperture Radar (SAR) is an operational tool for monitoring and assessment of oil spills. Satellite SAR has primarily been used to detect the presence/absence of oil, yet its ability to discriminate oil emulsions within a detected oil slick has not been fully exploited. Additionally, one of the challenges in the past has been the ability to deliver strategic information derived
Comparison of methods for modeling fractional cover using simulated satellite hyperspectral imager spectra
Remotely sensed data can be used to model the fractional cover of green vegetation (GV), non-photosynthetic vegetation (NPV), and soil in natural and agricultural ecosystems. NPV and soil cover are difficult to estimate accurately since absorption by lignin, cellulose, and other organic molecules cannot be resolved by broadband multispectral data. A new generation of satellite hyperspectral imager
Geology, Geophysics, and Geochemistry Science Center, St. Petersburg Coastal and Marine Science Center, Spectroscopy Lab
Imaging spectroscopy for the detection, assessment and monitoring of natural and anthropogenic hazards
Natural and anthropogenic hazards have the potential to impact all aspects of society including its economy and the environment. Diagnostic data to inform decision-making are critical for hazard management whether for emergency response, routine monitoring or assessments of potential risks. Imaging spectroscopy (IS) has unique contributions to make via the ability to provide some key quantitative
Isotopic ratios of Saturn's rings and satellites: Implications for the origin of water and Phoebe
Isotopic ratios have long been used to learn about physical processes acting over a wide range of geological environments, and in constraining the origin and/or evolution of planetary bodies. We report the spectroscopic detection of deuterium in Saturn's rings and satellites, and use these measurements to determine the (D/H) ratios in their near-surface regions. Saturn's moons, Phoebe and Iapetus,
Geology, Geophysics, and Geochemistry Science Center, Geology, Minerals, Energy, and Geophysics Science Center, Spectroscopy Lab
Spatial spectroscopic models for remote exploration
Ancient hydrothermal systems are a high-priority target for a future Mars sample return mission because they contain energy sources for microbes and can preserve organic materials (Farmer, 2000; MEPAG Next Decade Science Analysis Group, 2008; McLennan et al.,2012; Michalski et al.,2017). Characterizing these large, heterogeneous systems with a remote explorer is difficult due to communications ban
Below are news stories associated with this project.
Spectroscopy Lab Hosts Hyperspectral Imaging-UAS Training
The USGS Spectroscopy Laboratory hosted hyperspectral calibration and imaging from unmanned aircraft systems (UAS) training in June.


Upper Edge Property Management has been recognized and voted multiple times as The Best Winnipeg Property Management Company by Consumer Choice Awards. We are intently focussed on serving both owners and tenants and are dedicated to a culture of superior customer service.
Whether you own one investment property or ten, the partnership process with Upper Edge Property Management is easy, efficient and rewarding.
Upper Edge Property Management in Winnipeg offers some of the most premium services available for investors and tenants.


text:
Agreement Protects San Diego's Vanishing Burrowing Owls, Increases Solar Energy
Did you ever see something that looked wrong, go on your way, and later wish you had done or said something?
Jesse Marquez and friends went on a bird-watching trip and noticed that burrowing owls had been poisoned. Jesse followed up, didn't stop, reached out to others, and in partnership with those dedicated people and organizations achieved a great win for the burrowing owl and the American people.
Jesse is executive director of Coalition For A Safe Environment, an MFN member, and one of the most inspirational people in the EJ movement.
My lesson learned – speak up, fight for what's right, and try to be as smart and persistent as Jesse – a tall order.
Thank you, Jesse!
SAN DIEGO – An agreement announced today between conservation and environmental justice groups and private developers will protect imperiled burrowing owls, increase renewable solar energy and conserve wildlife habitat to offset impacts from the redevelopment of San Diego's Brown Field Municipal Airport. The airport – located near the Mexico border in Otay Mesa – will be redeveloped with new commercial and aviation facilities and include on-site solar energy to reduce energy consumption.
"This agreement provides an innovative strategy reestablishing burrowing owls throughout San Diego County and creates an effective tool to allow off-site mitigation of greenhouse gases with rooftop solar in communities most harmed by air pollution from fossil fuels," said Jonathan Evans, environmental health legal director at the Center for Biological Diversity.
The agreement enlists the San Diego Zoo Institute for Conservation Research in a multi-year program to help rebuild the struggling burrowing owl population on Otay Mesa and to establish a pilot program for implementing successful repopulation of burrowing owls in other areas throughout San Diego County. The agreement also sets aside habitat off the airport for burrowing owls and protects vanishing vernal pool habitat.
"Avoiding climate impacts and gaining protections for species being driven toward extinction are essential," said Van Collinsworth, director of Preserve Wild Santee. "We are pleased that the partnership with the San Diego Zoo will implement owl protection strategies while clean distributed energy will be boosted to reduce climate impacts."
The agreement would also establish a revolving trust fund to be managed by the San Diego Foundation to install off-site solar energy on facilities operated by nonprofit organizations serving low-income or disadvantaged communities. The redeveloped airport also commits to 12 megawatts of photovoltaic energy as part of the project, which is enough solar energy to power more than 3,000 homes.
"Burrowing owls and vernal pools have almost been wiped off the map in most of Southern California," said Jesse N. Marquez, executive director of Coalition For A Safe Environment. "We must take stronger wildlife habitat conservation actions to protect these amazing owls as part of our natural heritage from going extinct."
CFASEBurrowingOwlPhotos2011-2012
CFASESaveTheBurrowingOwlTeam
Burrowing owls have nearly been eliminated from San Diego County and require greater efforts to help rebuild their population. Vernal pools are small, seasonal wetlands that support plants and animals, like the endangered San Diego fairy shrimp, uniquely adapted to an environment that may dry up for months or years at a time. San Diego has lost about 98 percent of its vernal pools.
"Opportunities need to be provided to citizens to help us reduce our impacts on the Earth's climate," said Richard Halsey, director of the California Chaparral Institute. "The solar trust fund offers one such opportunity by facilitating the production of solar energy in neighborhoods where assistance is needed most."
The settlement agreement was agreed to by conservation and environmental-justice groups the Center for Biological Diversity, Preserve Wild Santee, California Chaparral Institute, Coalition for a Safe Environment, Community Dreams and California Kids IAQ. The groups were represented by the Center for Biological Diversity and Coast Law Group.
New Brown Field Project Aims To Protect Owl Species, Create Jobs, KPBS
Lawsuit Filed to Save San Diego's Vanishing Burrowing Owls and Wetlands – Groups Urge City to Stop Poisoning, Destruction of Burrowing Owls at Airport (2013), Center for Biological Diversity


Want to protect your tenant's rights? Four housing-related bills are up for vote this November. These are significant bills. Your vote helps to keep San Francisco affordable for all tenants.
The rental market has created feelings of "rage and fear and loss and anxiety," observes Don Falk in the San Francisco Examiner. It's no surprise, say housing advocates, that four major issues on up for vote.
Proposition A: Mayor Lee's $310 million housing bond to preserve low and middle-income housing, the City's largest affordable housing bond ever. This would include an allocation to repair public housing.
Proposition D: Approval is needed to increase in the height limit for a mix-use development by the AT&T Park. This development has 1,500 new rental apartments, of which 40% will be at a below-market rate.
Proposition F: Stricter control on short term rentals would limit the number of nightly stays to 75 per years and allow the City to find Airbnb and other similar sites for not registering rentals. It will also expand the legal rights of neighbors within 100 feet of the short-term rental and ban the use of in-law units as short term rentals.
Proposition I: An 18-month moratorium on projects in the Mission district for developments that demolish, convert or build at least five units. Those with 100% of the apartments at below market rates would be excluded from the moratorium.
Wondering if your tenant's rights are being violated? You should consider seeing an experienced tenant attorney would can help you understand your housing issue. Know your rights. Protect yourself.


text:
Using an inverter, you may produce AC power for your home's electrical appliances and electronics from the DC power stored in a battery (12 volts of direct current). The final AC frequency is determined by the type of equipment used to generate the current. Inverters exist in a wide variety of shapes and sizes, and they can be customized in various ways. Frequency inverters convert alternating current (AC) to direct current (DC).
There are two basic types of power inverters:
· Low-frequency inverter
· High-frequency inverter
We'll talk about low-frequency inverters in this section.
LFI: Low-Frequency Inverter
For increasing voltage, a low-frequency inverter uses a low-frequency transformer. Once the DC is converted into a low-frequency alternating current, it can be used. An inverter with a low frequency can perform a wide range of tasks. Alternating current (AC) is produced by converting DC to AC using transistors (AC). About 120 times a day, their transistors are activated and deactivated. These low-frequency power converters and inverter/chargers are the most reliable and long-lasting.
Because of the flywheel effect inherent in the physical size of a transformer's iron, a giant iron core transformer can absorb surge loads. Due to the slower switching frequency necessary to generate AC power, this inverter has the most extensive and robust field-effect transistors that can run cooler.
Sizeable off-grid power systems are best suited for these devices built for high-power applications. Because of this, inverters in this category typically have power outputs in the thousands, typically between 2000W and 3000W.
For a low-frequency transformer, the term "working frequency" refers to the power frequency of either 50Hz or 60Hz. There is a gradual alteration in the signal's waveform.
With little or no access to conventional energy, low-frequency inverters remain an excellent purchase for anyone with many electrical solid appliances. An appropriate solar power kit and a low-frequency inverter can give a stable backup supply and eliminate the need for a traditional utility grid. A low-frequency inverter is a more reliable long-term investment than a high-frequency inverter because of the low-frequency inverter's low failure rate. They are, in fact, more prominent, more vital, and more ferocious than us.
Among the Low-Frequency Inverter's advantages
A UPS (uninterruptible power supply) features a low-frequency inverter. Bypass mode, power-saving mode, and various charging options are the primary functions of this built-in battery charger.
Multiple DC voltages can be input, dual output voltages (120/240VAC) are provided, and integrated battery chargers and shore power transfer relay for different chemical batteries are available on these inverters.
Advantages over high-frequency inverters
There are two areas where low frequency power inverter has an advantage over a high-frequency inverter:
· If the nominal power level is 300 percent of the peak power level, low-frequency inverters can function at that level for several seconds. Still, high-frequency inverters can operate at such a level for a minimum period.
· High-frequency inverters are less dependable and sturdier than low-frequency inverters because they use smaller transformers.
Types of low-frequency inverters
Following are the types of low-frequency inverters:
· A continuous power rating of 2kVA (XTM1500: 1.5kVA) is provided by the 12V-XTM inverter/charger low frequency inverter. For up to five seconds, the XTM1500 can deliver 4.8kVA (XTM1500 can deliver 3.5kVA). Because of its tremendous surge power capacity, it can supply loads with a high startup current without incident. It is possible to regulate the charging current from 0 to 100 dc.
· 24V-XTM inverter/charger low frequency inverter has a continuous power rating of 3kVA (XTM2000: 2kVA), 30 minute power rating of 3.5kVA (XTM2000: 2.4kVA), and can supply 9kVA (XTM2000: 6kVA) for up to 5 seconds. A range of 0 to 90Adc can be selected for the battery charge current.
· The 48V-XTM inverter/charger low frequency inverter has a continuous power rating of 3.5kVA (XTM2600: 2kVA), a 30 minute power rating of 4kVA (XTM2600: 2.6kVA) and can supply 10.5kVA (XTM2600: 6.5kVA) for up to 5 seconds. It is possible to set the battery charge current between 0 and 50ADC (XTM2600: 30A)
Pros and cons of Low-frequency inverter
The advantages and disadvantages of using a Low-Frequency Inverter are as follows:
Among the advantages of a low-frequency inverter are:
· For high-surge loads, it performs well
· It's quieter and more energy-efficient.
The following are some drawbacks to using a low-frequency inverter:
· It is heavier than other frequency inverters.
· Because of this, it costs extra.
What is the function of a low-frequency inverter?
"Low frequency" refers to how Low-Frequency inverters employ high-speed transistors to convert DC electricity into AC power. Still, they drive transistors at the same frequency (60Hz or 50Hz) as the AC sine wave output voltage.
What is the function of a frequency inverter?
You may control an AC motor's speed with frequency inverters, electronic equipment. Only a fixed speed is available based on the number of poles and supply frequency of a power supply system when AC motors are driven directly from that system.
Is low frequency inverter expensive?
Low-frequency inverters are more expensive than high-frequency inverters because of their higher peak performance and reliability. If you don't use a lot of energy and need to power a few tiny gadgets, a high-frequency inverter is the best option for you.
If you're establishing an off-grid power system with no substantial power limits or if you're running powerful appliances and gadgets with electric motors like power tools, washing machines, vacuum cleaners, and air conditioners, then low-frequency inverters will provide you with the best solution.
Low-frequency inverters are also ideal for consumers who want to power various kitchen appliances, such as refrigerators, microwaves, dishwashers, and ovens.
Low-frequency inverters are still a significant expenditure for people with a large number of powerful equipment in areas where standard power is limited or non-existent. When paired with an appropriate solar kit, the low-frequency inverter may not only provide a solid backup power option but can also totally replace conventional electricity with the same quality power source.
What are solar power inverters and what is the best solar hybrid inverter?


• A trap-laden lair that requires stealth and clever tactics to survive!
• A labyrinthine mausoleum, where wormhearted invaders sow chaos and madness among the dead!
• The schemes of a demon-cult of thieves and unscrupulous wizards!
• An unstable magical artifact built in a ruined ley line conduit!
• A flying palace seized by an army of gnoll bandits!
And much more! Eldritch Lairs offers ready-to-go adventures full of magic and horror for your game.
Want to know when Eldritch Lairs (PFRPG) Paperback - ozgameshop.com drops below a certain price? Enter your email address and price below and we'll let you know when it drops below that price!


text:
Best of the 00s: Damien Rice, Death Cab For Cutie & Deerhunter
Posted by ashmatty October 25th, 2010 No Comments »
Best of the 00s: Gabe Joins the 21st Century
Part 11: Damien Rice, Death Cab for Cutie & Deerhunter
Nada Co-founders Matt and Gabe are listening to 197 of the music press's picks for "best albums of the 00s" for a series called Gabe Joins the 21st Century.
Damien Rice – O
Paste #30
Gabe: The chorus on O's first track goes "Why d'ya sing hallelujah/if it means nothing to ya/Why d'ya sing with me at all?" That line – especially in the context of a wistful yet passionate ballad – evokes Leonard Cohen by way of the ghost of Jeff Buckley. And I've got no doubt that Mr. Buckley and Mr. Cohen would appreciate Mr. Rice's musicianship and songwriting ability. But despite the fact that the first four tracks, highlighted by the magnificent "Cannonball", are very strong, the rest of the album is just too meandering, precious and samey-samey for my taste. Grade: DNL
Matt: Like his fellow busker and Irish countrymen Glenn Hansgard (Swell Season, The Frames), Damien Rice composes careful folk songs with lush, emotional arrangements. There's a couple of memorable numbers ("Volcano," "The Blower's Daughter" and "Cannonball" would all fit great in an offbeat Indie romance) on O but, for the most part, it's a wimpy, adult-oriented snoozefest. And although it's sonically very similar to the Swell Season stuff I adore, it's just not as captivating or memorable. – DNL
Death Cab for Cutie – Plans
KEXP #42
Matt: I spent a long time actively disliking Death Cab for Cutie, so it seems inappropriate to pan this album, their fifth, so quickly after falling in love with its excellent predecessor Transatlanticism (which you'll hear about later in the countdown.) The thing about Death Cab is that they make nice, pleasant, unobtrusive music. Put on one of their records at any social gathering and it will make for nice background scoring. No one will complain. Sometimes I resent them for capturing such a large, devoted crossover following with such a tame sound. Other times I marvel at it. On Plans, unfortunately, only the catchy single "Crooked Teeth," gorgeous acoustic ballad "I Will Follow You Into the Dark" and "badap-badap-badas" of "Soul Meets Body" are even remotely affecting. The other eight songs are so boring and innocuous that they fade from memory almost before they finish. Grade: DNL
Gabe: It took me a while to figure out what I don't like about this album. Then it dawned on me – Plans reminds me of Christian rock. It's full of polished and professional songs performed by obviously talented musicians, with crisp, clean production and polite instrumentation that put the lyrics front and center. Which would be fine except the lyrics are mostly vague, pseudo-profound sentiments like "I want to live where the soul meets body." Gee, me too. Where exactly is that again? Give me an address or some coordinates and I'll plug it into my GPS and meet you there. We can hold hands and talk about our feelings. Grade: DNL
Deerhunter – Microcastle
Gabe: I gave Microcastle a chance. Actually I gave it 10 chances because Matt blatantly ignored the rules of the project by letting it slip that he has listened to Microcastle "like a thousand times in the last six months". If there's a phrase that means the opposition of "poisoned the well," that's what Matt did. So I listened to this over and over trying to figure out what makes Microcastle so awesome. After all, if the Nada high potentate has it in heavy rotation it must be good, right? It couldn't be that Microcastle is just another ordinay collection of pretty boy art college indie rock, could it? It's not that bad, actually. The songs are pretty. The singer sounds 50% awake, but 110% sensitive. I might have liked it more if Matt hadn't hyped it so much. Grade: DNL
Matt: My relationship with Deerhunter was just beginning when I scirbed my list of favorite albums of the past decade, but if you asked me to do it again now, Microcastle would undoubtedly make the top 20, thanks to a rare combination of musical factors.
1) It has a distinct overall vibe and aesthetic. "Sonic Youth lite"… "Lazy, intricate space rock"…"neo-shoegaze"…call it what you will, but there's a warm, groovy vibe to this record that's more than the sum of its parts.
2) Within that aesthetic there is great variation. No two songs on the Atlanta band's lauded debut are remotely similar in structure, yet it all comes together as a cohesive whole. Tune in at any point, and you are unmistakably listening to Microcastle and only Microcastle.
3) There's a nice balance between immediate pay offs and more elaborate musical onions that reveal themselves upon multiple listens.
The first 30 times I played this I couldn't make it through without replaying "Never Stops" and "Nothing Ever Happened" multiple times, but it took me 30 more before I fully embraced the power of awesome title track, which opens with a sparse, indecipherable vocal and gentle guitar line that the band later fills in with a big, full-instrumentation payoff. With each listen, one has more connection to the whole and can therefore fill in more of the opening on his or her own, a rare and wonderful musical feat. Grade: LOVE
More in this series:
Part 28: Midlake, Missy Elliott & Modest Mouse
Part 27: Luomo, Manu Chau & Microphones
Part 26: Lil' Wayne , Loretta Lynn & Los Halos
Part 25: Klaxons, Les Savy Fav & The Libertines
Part 24: Justin Timberlake, Kanye West & Kings of Leon
Part 23: Johnny Cash, Josh Ritter & Justin Timberlake
Part 22: Jens Lekman & Joanna Newsome
Part 21: Iron & Wine, Jay-Z & The Jayhawks
Part 20: Gentlemen Jesse, Grandaddy & The Hold Steady
Part 19: Devin the Dude,the Deglados & the Fruit Bats
Part 18: The Blood Brothers, The Coral & The Coup
Part 17: Avett Brothers & Black Angels
Part 16: Fennesz, Girl Talk & Grizzly Bear
Part 15: Bob Dylan, Fiona Apple & Gilian Welch
Part 14: Elbow, Exploding Hearts & Green Day
Part 12: Dirty Projectors, Dizzee Rascal, & The Drive By Truckers
Part 10: Basement Jaxx, Cat Power & Clipse
Part 9: Bruce Springsteen, Clinic & Crystal Castles
Part 8: Bobby Bare Jr., Boredoms & Burial
Part 7: 50 Cent, American Analog Set & Babyshambles
Part 6: Boards of Canada, Brendan Benson & Bruce Springsteen
Part 5: Bob Dylan, Bobby Bare Jr. & Bright Eyes
Part 4: Animal Collective, Beck & Built to Spill
Part 3: Basement Jaxx, Black Mountain & Blur
Part 2: Animal Collective, Antony & the Johnsons and At the Drive In
00s in Review: Gabe Joins the 21st Century


Since its creation in 1890, the name Van Der Bauwede rimes with luxury. The brand is an acknowledged reference in the field of watch and jewelry displaying its great expertise on precious stones.
Backed by the irrevocable 'Swiss Made' quality, Van Der Bauwede dares to shake up tradition with its anti-conformist style and sensuality through its three complementary brands: Van Der Bauwede Since 1890, Van Der Bauwede Genève and VDB by Van Der Bauwede.


text:
Fu Chan Coffee Shop @ Tampines
Fu Chan F&B Group is a private limited company that was first established in 1999. Currently, they have a total of 19 outlets that spreads island wide.
Their Tampines outlet that I visited was established in the year 2011. Patrons will be elated to know that it runs for 24 hours daily! Super early breakfast or late-night supper munches can be settled at this unpretentious and newly renovated coffee shop. On top of the already many attractive points, Fu Chan Coffee Shop also broadcasts football daily.
Conveniently located near the Tampines Round Market & Food Centre, the coffee shop is a 15-20 mins walk from Tampines MRT station.
So what is it that distinguishes Fu Chan from the rest of the coffee shops around? Let's take a look at what their menu has to offer.
For drinks, Fu Chan Beverages is the place to go to quench your thirst. The pop of striking colours from all over the shop speaks for itself - whichever drink you want, they've probably got it.
I went for my usual choice, which was also the shop's most popular drink. The $1.40 Homemade Iced Lemon Tea came in a beer mug. It leaned towards the sweeter side with a tinge of sour taste from the lemon, just the way I like it.
If you're the kind who loves breakfast sets, you'd be delighted to know that Fu Chan Beverages offers all-day value set meals. You can fill your tummy for just $2!
If you're craving for something soupy, you'll be slurpified at Soup Master. You can even request to top-up your soup, and it's all free-of-charge!
I went for the Old Cucumber Soup which was inexpensive for $4. The taste was rather bland, but the ingredients used are nourishing for the body.
Meat lovers, you'll probably drool over what Roasted Delights has to offer. One will never go wrong with the dishes they serve, in which most are local favourites!
At just $3, you can have either the Char Siew Rice or Roasted Pork Rice. The option to have the best of both worlds are available too at $3.50. The meat are not overly salty, and the portion I was served was pretty generous!
Konnichiwa! Aji-Ichi serves Land of the Rising Sun cuisine, which probably explains the striking red colour of their stall. You can choose from a list of ramen, udon, donburi or nabemono dishes, unique from what the typical kopitiam Japanese food stalls serve.
Had the Japanese Beef Rice priced at $7.50 which comes with miso soup. The meat was so-so, I felt that it lacked a certain oomph factor. I wish they added more sauce or maybe complete the dish with an egg below it. But the winning factor was the rice they use; it tasted similar to what I had in Japan! Fat and round, you can't help but to take another spoonful. I later learnt that my speculations were right - Aji-Ichi uses the best rice out of all the stalls at Fu Chan.
Moving on, Ho Kee serves the wok dishes I love!
Their specialty - the Fried Hokkien Mee. Available at $3.50 for Small, $4.50 for Medium and $6 for Large. It was appropriately wet, satisfying and flavourful. The generous portion was not overly greasy at all. The chilli sauce also brought a kick to the dish!
Be even more spoilt for choices at Mixed Vegetable. Mix and match what you'd like to have with the troughs of cooked food.
The star dish is probably their Curry Fish Head, served in claypot style. At $16, it tasted decent with fish meat that's tender. The taste of the curry was not overly rich either.
If food from the East is not to your liking, why not go West with Kare Express & Grill by Raj Brothers?
Not only is their Chicken Chop huge in portion, it has a pocket-friendly price tag of only $5.50. That's quite a bang for your buck! You could taste the flavour of the chicken that matched well with the pool of mushroom sauce and it's crispy grilled skin. I am a fan of their mashed potato and salad sides as well.
What caught my eye though was Sukho Thai! They specialize in authentic and economically priced Thailand zi char dishes.
I was bolted awake immediately after my first sip of their Tom Yum Soup. Available at $12.90 for Small and $21.90 for Large, boy is it chokingly spicy! This kick-ass soup gives a sour yet mildly sweet aftertaste.
For the sweet-toothed, one of the dessert choices is the Mango Glutinous Rice. Not only is the mango sweet, it goes hand-in-hand with the warm sticky rice for only $5.50. Though it may not be the best around, this dessert is still up to the mark to end your meal with.
Another pick would be the Tapioca drenched in coconut milk. The warmly served shiok-ness will leave you in goosebumps as it's not bad at all, and it's only $3.90!
Last but not least, Al Habib is the best stall to go for late night supper! They serve the nation's favourite roti prata! They are all made-to-order, therefore freshness is guaranteed.
As the name suggests, the Paper Prata (Chocolate) is paper thin. Despite the massive height, you can peel it open layer by layer easily. The $2.50 giant is crispy and the sweet chocolate sauce goes well with it.
For a not-as-sweet option, you can pick the Paper Prata (Strawberry), available at the same price.
Fu Chan Coffee Shop
139 Tampines Street 11
Bus Services near the area: 8, 17, 18, 20, 28, 34, 39, 59, 292, 518
advertorialaji ichial habibfoodho keeiisjongkare express grillmixed vegetableroasted delightssingaporesingapore foodsingapore lifestyle bloggersoup mastersponsoredsukho thaitampines


text:
DEFINES+=PROJECT_CONF_H=\"project-conf.h\"
CONTIKI_PROJECT = ubidots-client

APPS = ubidots

CONTIKI_TARGET_SOURCEFILES += sht25.c

all: $(CONTIKI_PROJECT)

WITH_IPV6 = 1

CONTIKI = ../../../..

include $(CONTIKI)/Makefile.include

redpajama_set_name: RedPajamaGithub


text:
#ifndef FLATBUFFERS_IDL_H_
#define FLATBUFFERS_IDL_H_

#include <algorithm>
#include <functional>
#include <map>
#include <memory>
#include <stack>

#include "flatbuffers/base.h"
#include "flatbuffers/flatbuffers.h"
#include "flatbuffers/flexbuffers.h"
#include "flatbuffers/hash.h"
#include "flatbuffers/reflection.h"

// This file defines the data types representing a parsed IDL (Interface
// Definition Language) / schema file.

// Limits maximum depth of nested objects.
// Prevents stack overflow while parse scheme, or json, or flexbuffer.
#if !defined(FLATBUFFERS_MAX_PARSING_DEPTH)
#  define FLATBUFFERS_MAX_PARSING_DEPTH 64
#endif

namespace flatbuffers {

// The order of these matters for Is*() functions below.
// Additionally, Parser::ParseType assumes bool..string is a contiguous range
// of type tokens.
// clang-format off
#define FLATBUFFERS_GEN_TYPES_SCALAR(TD) \
  TD(NONE,   "",       uint8_t,  byte,   byte,    byte,   uint8,   u8,   UByte, UInt8) \
  TD(UTYPE,  "",       uint8_t,  byte,   byte,    byte,   uint8,   u8,   UByte, UInt8) /* begin scalar/int */ \
  TD(BOOL,   "bool",   uint8_t,  boolean,bool,    bool,   bool,    bool, Boolean, Bool) \
  TD(CHAR,   "byte",   int8_t,   byte,   int8,    sbyte,  int8,    i8,   Byte, Int8) \
  TD(UCHAR,  "ubyte",  uint8_t,  byte,   byte,    byte,   uint8,   u8,   UByte, UInt8) \
  TD(SHORT,  "short",  int16_t,  short,  int16,   short,  int16,   i16,  Short, Int16) \
  TD(USHORT, "ushort", uint16_t, short,  uint16,  ushort, uint16,  u16,  UShort, UInt16) \
  TD(INT,    "int",    int32_t,  int,    int32,   int,    int32,   i32,  Int, Int32) \
  TD(UINT,   "uint",   uint32_t, int,    uint32,  uint,   uint32,  u32,  UInt, UInt32) \
  TD(LONG,   "long",   int64_t,  long,   int64,   long,   int64,   i64,  Long, Int64) \
  TD(ULONG,  "ulong",  uint64_t, long,   uint64,  ulong,  uint64,  u64,  ULong, UInt64) /* end int */ \
  TD(FLOAT,  "float",  float,    float,  float32, float,  float32, f32,  Float, Float32) /* begin float */ \
  TD(DOUBLE, "double", double,   double, float64, double, float64, f64,  Double, Double) /* end float/scalar */
#define FLATBUFFERS_GEN_TYPES_POINTER(TD) \
  TD(STRING, "string", Offset<void>, int, int, StringOffset, int, unused, Int, Offset<String>) \
  TD(VECTOR, "",       Offset<void>, int, int, VectorOffset, int, unused, Int, Offset<UOffset>) \
  TD(STRUCT, "",       Offset<void>, int, int, int,          int, unused, Int, Offset<UOffset>) \
  TD(UNION,  "",       Offset<void>, int, int, int,          int, unused, Int, Offset<UOffset>)
#define FLATBUFFERS_GEN_TYPE_ARRAY(TD) \
  TD(ARRAY,  "",       int,          int, int, int,          int, unused, Int, Offset<UOffset>)
// The fields are:
// - enum
// - FlatBuffers schema type.
// - C++ type.
// - Java type.
// - Go type.
// - C# / .Net type.
// - Python type.
// - Kotlin type.
// - Rust type.

// using these macros, we can now write code dealing with types just once, e.g.

/*
switch (type) {
  #define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, JTYPE, GTYPE, NTYPE, PTYPE, \
                         RTYPE, KTYPE) \
    case BASE_TYPE_ ## ENUM: \
      // do something specific to CTYPE here
    FLATBUFFERS_GEN_TYPES(FLATBUFFERS_TD)
  #undef FLATBUFFERS_TD
}
*/

// If not all FLATBUFFERS_GEN_() arguments are necessary for implementation
// of FLATBUFFERS_TD, you can use a variadic macro (with __VA_ARGS__ if needed).
// In the above example, only CTYPE is used to generate the code, it can be rewritten:

/*
switch (type) {
  #define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, ...) \
    case BASE_TYPE_ ## ENUM: \
      // do something specific to CTYPE here
    FLATBUFFERS_GEN_TYPES(FLATBUFFERS_TD)
  #undef FLATBUFFERS_TD
}
*/

#define FLATBUFFERS_GEN_TYPES(TD) \
        FLATBUFFERS_GEN_TYPES_SCALAR(TD) \
        FLATBUFFERS_GEN_TYPES_POINTER(TD) \
        FLATBUFFERS_GEN_TYPE_ARRAY(TD)

// Create an enum for all the types above.
#ifdef __GNUC__
__extension__  // Stop GCC complaining about trailing comma with -Wpendantic.
#endif
enum BaseType {
  #define FLATBUFFERS_TD(ENUM, ...) \
    BASE_TYPE_ ## ENUM,
    FLATBUFFERS_GEN_TYPES(FLATBUFFERS_TD)
  #undef FLATBUFFERS_TD
};

#define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, ...) \
  static_assert(sizeof(CTYPE) <= sizeof(largest_scalar_t), \
                "define largest_scalar_t as " #CTYPE);
  FLATBUFFERS_GEN_TYPES(FLATBUFFERS_TD)
#undef FLATBUFFERS_TD

inline bool IsScalar (BaseType t) { return t >= BASE_TYPE_UTYPE &&
                                           t <= BASE_TYPE_DOUBLE; }
inline bool IsInteger(BaseType t) { return t >= BASE_TYPE_UTYPE &&
                                           t <= BASE_TYPE_ULONG; }
inline bool IsFloat  (BaseType t) { return t == BASE_TYPE_FLOAT ||
                                           t == BASE_TYPE_DOUBLE; }
inline bool IsLong   (BaseType t) { return t == BASE_TYPE_LONG ||
                                           t == BASE_TYPE_ULONG; }
inline bool IsBool   (BaseType t) { return t == BASE_TYPE_BOOL; }
inline bool IsOneByte(BaseType t) { return t >= BASE_TYPE_UTYPE &&
                                           t <= BASE_TYPE_UCHAR; }

inline bool IsUnsigned(BaseType t) {
  return (t == BASE_TYPE_UTYPE)  || (t == BASE_TYPE_UCHAR) ||
         (t == BASE_TYPE_USHORT) || (t == BASE_TYPE_UINT)  ||
         (t == BASE_TYPE_ULONG);
}

// clang-format on

extern const char *const kTypeNames[];
extern const char kTypeSizes[];

inline size_t SizeOf(BaseType t) { return kTypeSizes[t]; }

struct StructDef;
struct EnumDef;
class Parser;

// Represents any type in the IDL, which is a combination of the BaseType
// and additional information for vectors/structs_.
struct Type {
  explicit Type(BaseType _base_type = BASE_TYPE_NONE, StructDef *_sd = nullptr,
                EnumDef *_ed = nullptr, uint16_t _fixed_length = 0)
      : base_type(_base_type),
        element(BASE_TYPE_NONE),
        struct_def(_sd),
        enum_def(_ed),
        fixed_length(_fixed_length) {}

  bool operator==(const Type &o) const {
    return base_type == o.base_type && element == o.element &&
           struct_def == o.struct_def && enum_def == o.enum_def;
  }

  Type VectorType() const {
    return Type(element, struct_def, enum_def, fixed_length);
  }

  Offset<reflection::Type> Serialize(FlatBufferBuilder *builder) const;

  bool Deserialize(const Parser &parser, const reflection::Type *type);

  BaseType base_type;
  BaseType element;       // only set if t == BASE_TYPE_VECTOR
  StructDef *struct_def;  // only set if t or element == BASE_TYPE_STRUCT
  EnumDef *enum_def;      // set if t == BASE_TYPE_UNION / BASE_TYPE_UTYPE,
                          // or for an integral type derived from an enum.
  uint16_t fixed_length;  // only set if t == BASE_TYPE_ARRAY
};

// Represents a parsed scalar value, it's type, and field offset.
struct Value {
  Value()
      : constant("0"),
        offset(static_cast<voffset_t>(~(static_cast<voffset_t>(0U)))) {}
  Type type;
  std::string constant;
  voffset_t offset;
};

// Helper class that retains the original order of a set of identifiers and
// also provides quick lookup.
template<typename T> class SymbolTable {
 public:
  ~SymbolTable() {
    for (auto it = vec.begin(); it != vec.end(); ++it) { delete *it; }
  }

  bool Add(const std::string &name, T *e) {
    vec.emplace_back(e);
    auto it = dict.find(name);
    if (it != dict.end()) return true;
    dict[name] = e;
    return false;
  }

  void Move(const std::string &oldname, const std::string &newname) {
    auto it = dict.find(oldname);
    if (it != dict.end()) {
      auto obj = it->second;
      dict.erase(it);
      dict[newname] = obj;
    } else {
      FLATBUFFERS_ASSERT(false);
    }
  }

  T *Lookup(const std::string &name) const {
    auto it = dict.find(name);
    return it == dict.end() ? nullptr : it->second;
  }

 public:
  std::map<std::string, T *> dict;  // quick lookup
  std::vector<T *> vec;             // Used to iterate in order of insertion
};

// A name space, as set in the schema.
struct Namespace {
  Namespace() : from_table(0) {}

  // Given a (potentially unqualified) name, return the "fully qualified" name
  // which has a full namespaced descriptor.
  // With max_components you can request less than the number of components
  // the current namespace has.
  std::string GetFullyQualifiedName(const std::string &name,
                                    size_t max_components = 1000) const;

  std::vector<std::string> components;
  size_t from_table;  // Part of the namespace corresponds to a message/table.
};

inline bool operator<(const Namespace &a, const Namespace &b) {
  size_t min_size = std::min(a.components.size(), b.components.size());
  for (size_t i = 0; i < min_size; ++i) {
    if (a.components[i] != b.components[i])
      return a.components[i] < b.components[i];
  }
  return a.components.size() < b.components.size();
}

// Base class for all definition types (fields, structs_, enums_).
struct Definition {
  Definition()
      : generated(false),
        defined_namespace(nullptr),
        serialized_location(0),
        index(-1),
        refcount(1),
        declaration_file(nullptr) {}

  flatbuffers::Offset<
      flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>>>
  SerializeAttributes(FlatBufferBuilder *builder, const Parser &parser) const;

  bool DeserializeAttributes(Parser &parser,
                             const Vector<Offset<reflection::KeyValue>> *attrs);

  std::string name;
  std::string file;
  std::vector<std::string> doc_comment;
  SymbolTable<Value> attributes;
  bool generated;  // did we already output code for this definition?
  Namespace *defined_namespace;  // Where it was defined.

  // For use with Serialize()
  uoffset_t serialized_location;
  int index;  // Inside the vector it is stored.
  int refcount;
  const std::string *declaration_file;
};

struct FieldDef : public Definition {
  FieldDef()
      : deprecated(false),
        key(false),
        shared(false),
        native_inline(false),
        flexbuffer(false),
        presence(kDefault),
        nested_flatbuffer(nullptr),
        padding(0) {}

  Offset<reflection::Field> Serialize(FlatBufferBuilder *builder, uint16_t id,
                                      const Parser &parser) const;

  bool Deserialize(Parser &parser, const reflection::Field *field);

  bool IsScalarOptional() const {
    return IsScalar(value.type.base_type) && IsOptional();
  }
  bool IsOptional() const { return presence == kOptional; }
  bool IsRequired() const { return presence == kRequired; }
  bool IsDefault() const { return presence == kDefault; }

  Value value;
  bool deprecated;  // Field is allowed to be present in old data, but can't be.
                    // written in new data nor accessed in new code.
  bool key;         // Field functions as a key for creating sorted vectors.
  bool shared;  // Field will be using string pooling (i.e. CreateSharedString)
                // as default serialization behavior if field is a string.
  bool native_inline;  // Field will be defined inline (instead of as a pointer)
                       // for native tables if field is a struct.
  bool flexbuffer;     // This field contains FlexBuffer data.

  enum Presence {
    // Field must always be present.
    kRequired,
    // Non-presence should be signalled to and controlled by users.
    kOptional,
    // Non-presence is hidden from users.
    // Implementations may omit writing default values.
    kDefault,
  };
  Presence static MakeFieldPresence(bool optional, bool required) {
    FLATBUFFERS_ASSERT(!(required && optional));
    // clang-format off
    return required ? FieldDef::kRequired
         : optional ? FieldDef::kOptional
                    : FieldDef::kDefault;
    // clang-format on
  }
  Presence presence;

  StructDef *nested_flatbuffer;  // This field contains nested FlatBuffer data.
  size_t padding;                // Bytes to always pad after this field.
};

struct StructDef : public Definition {
  StructDef()
      : fixed(false),
        predecl(true),
        sortbysize(true),
        has_key(false),
        minalign(1),
        bytesize(0) {}

  void PadLastField(size_t min_align) {
    auto padding = PaddingBytes(bytesize, min_align);
    bytesize += padding;
    if (fields.vec.size()) fields.vec.back()->padding = padding;
  }

  Offset<reflection::Object> Serialize(FlatBufferBuilder *builder,
                                       const Parser &parser) const;

  bool Deserialize(Parser &parser, const reflection::Object *object);

  SymbolTable<FieldDef> fields;

  bool fixed;       // If it's struct, not a table.
  bool predecl;     // If it's used before it was defined.
  bool sortbysize;  // Whether fields come in the declaration or size order.
  bool has_key;     // It has a key field.
  size_t minalign;  // What the whole object needs to be aligned to.
  size_t bytesize;  // Size if fixed.

  flatbuffers::unique_ptr<std::string> original_location;
};

struct EnumDef;
struct EnumValBuilder;

struct EnumVal {
  Offset<reflection::EnumVal> Serialize(FlatBufferBuilder *builder,
                                        const Parser &parser) const;

  bool Deserialize(Parser &parser, const reflection::EnumVal *val);

  flatbuffers::Offset<
      flatbuffers::Vector<flatbuffers::Offset<reflection::KeyValue>>>
  SerializeAttributes(FlatBufferBuilder *builder, const Parser &parser) const;

  bool DeserializeAttributes(Parser &parser,
                             const Vector<Offset<reflection::KeyValue>> *attrs);

  uint64_t GetAsUInt64() const { return static_cast<uint64_t>(value); }
  int64_t GetAsInt64() const { return value; }
  bool IsZero() const { return 0 == value; }
  bool IsNonZero() const { return !IsZero(); }

  std::string name;
  std::vector<std::string> doc_comment;
  Type union_type;
  SymbolTable<Value> attributes;

 private:
  friend EnumDef;
  friend EnumValBuilder;
  friend bool operator==(const EnumVal &lhs, const EnumVal &rhs);

  EnumVal(const std::string &_name, int64_t _val) : name(_name), value(_val) {}
  EnumVal() : value(0) {}

  int64_t value;
};

struct EnumDef : public Definition {
  EnumDef() : is_union(false), uses_multiple_type_instances(false) {}

  Offset<reflection::Enum> Serialize(FlatBufferBuilder *builder,
                                     const Parser &parser) const;

  bool Deserialize(Parser &parser, const reflection::Enum *values);

  template<typename T> void ChangeEnumValue(EnumVal *ev, T new_val);
  void SortByValue();
  void RemoveDuplicates();

  std::string AllFlags() const;
  const EnumVal *MinValue() const;
  const EnumVal *MaxValue() const;
  // Returns the number of integer steps from v1 to v2.
  uint64_t Distance(const EnumVal *v1, const EnumVal *v2) const;
  // Returns the number of integer steps from Min to Max.
  uint64_t Distance() const { return Distance(MinValue(), MaxValue()); }

  EnumVal *ReverseLookup(int64_t enum_idx,
                         bool skip_union_default = false) const;
  EnumVal *FindByValue(const std::string &constant) const;

  std::string ToString(const EnumVal &ev) const {
    return IsUInt64() ? NumToString(ev.GetAsUInt64())
                      : NumToString(ev.GetAsInt64());
  }

  size_t size() const { return vals.vec.size(); }

  const std::vector<EnumVal *> &Vals() const { return vals.vec; }

  const EnumVal *Lookup(const std::string &enum_name) const {
    return vals.Lookup(enum_name);
  }

  bool is_union;
  // Type is a union which uses type aliases where at least one type is
  // available under two different names.
  bool uses_multiple_type_instances;
  Type underlying_type;

 private:
  bool IsUInt64() const {
    return (BASE_TYPE_ULONG == underlying_type.base_type);
  }

  friend EnumValBuilder;
  SymbolTable<EnumVal> vals;
};

inline bool IsString(const Type &type) {
  return type.base_type == BASE_TYPE_STRING;
}

inline bool IsStruct(const Type &type) {
  return type.base_type == BASE_TYPE_STRUCT && type.struct_def->fixed;
}

inline bool IsTable(const Type &type) {
  return type.base_type == BASE_TYPE_STRUCT && !type.struct_def->fixed;
}

inline bool IsUnion(const Type &type) {
  return type.enum_def != nullptr && type.enum_def->is_union;
}

inline bool IsUnionType(const Type &type) {
  return IsUnion(type) && IsInteger(type.base_type);
}

inline bool IsVector(const Type &type) {
  return type.base_type == BASE_TYPE_VECTOR;
}

inline bool IsVectorOfStruct(const Type &type) {
  return IsVector(type) && IsStruct(type.VectorType());
}

inline bool IsVectorOfTable(const Type &type) {
  return IsVector(type) && IsTable(type.VectorType());
}

inline bool IsArray(const Type &type) {
  return type.base_type == BASE_TYPE_ARRAY;
}

inline bool IsSeries(const Type &type) {
  return IsVector(type) || IsArray(type);
}

inline bool IsEnum(const Type &type) {
  return type.enum_def != nullptr && IsInteger(type.base_type);
}

inline size_t InlineSize(const Type &type) {
  return IsStruct(type)
             ? type.struct_def->bytesize
             : (IsArray(type)
                    ? InlineSize(type.VectorType()) * type.fixed_length
                    : SizeOf(type.base_type));
}

inline size_t InlineAlignment(const Type &type) {
  if (IsStruct(type)) {
    return type.struct_def->minalign;
  } else if (IsArray(type)) {
    return IsStruct(type.VectorType()) ? type.struct_def->minalign
                                       : SizeOf(type.element);
  } else {
    return SizeOf(type.base_type);
  }
}
inline bool operator==(const EnumVal &lhs, const EnumVal &rhs) {
  return lhs.value == rhs.value;
}
inline bool operator!=(const EnumVal &lhs, const EnumVal &rhs) {
  return !(lhs == rhs);
}

inline bool EqualByName(const Type &a, const Type &b) {
  return a.base_type == b.base_type && a.element == b.element &&
         (a.struct_def == b.struct_def ||
          a.struct_def->name == b.struct_def->name) &&
         (a.enum_def == b.enum_def || a.enum_def->name == b.enum_def->name);
}

struct RPCCall : public Definition {
  Offset<reflection::RPCCall> Serialize(FlatBufferBuilder *builder,
                                        const Parser &parser) const;

  bool Deserialize(Parser &parser, const reflection::RPCCall *call);

  StructDef *request, *response;
};

struct ServiceDef : public Definition {
  Offset<reflection::Service> Serialize(FlatBufferBuilder *builder,
                                        const Parser &parser) const;
  bool Deserialize(Parser &parser, const reflection::Service *service);

  SymbolTable<RPCCall> calls;
};

struct IncludedFile {
  // The name of the schema file being included, as defined in the .fbs file.
  // This includes the prefix (e.g., include "foo/bar/baz.fbs" would mean this
  // value is "foo/bar/baz.fbs").
  std::string schema_name;

  // The filename of where the included file was found, after searching the
  // relative paths plus any other paths included with `flatc -I ...`. Note,
  // while this is sometimes the same as schema_name, it is not always, since it
  // can be defined relative to where flatc was invoked.
  std::string filename;
};

// Since IncludedFile is contained within a std::set, need to provide ordering.
inline bool operator<(const IncludedFile &a, const IncludedFile &b) {
  return a.filename < b.filename;
}

// Container of options that may apply to any of the source/text generators.
struct IDLOptions {
  // field case style options for C++
  enum CaseStyle { CaseStyle_Unchanged = 0, CaseStyle_Upper, CaseStyle_Lower };

  bool gen_jvmstatic;
  // Use flexbuffers instead for binary and text generation
  bool use_flexbuffers;
  bool strict_json;
  bool output_default_scalars_in_json;
  int indent_step;
  bool cpp_minify_enums;
  bool output_enum_identifiers;
  bool prefixed_enums;
  bool scoped_enums;
  bool swift_implementation_only;
  bool include_dependence_headers;
  bool mutable_buffer;
  bool one_file;
  bool proto_mode;
  bool proto_oneof_union;
  bool generate_all;
  bool skip_unexpected_fields_in_json;
  bool generate_name_strings;
  bool generate_object_based_api;
  bool gen_compare;
  std::string cpp_object_api_pointer_type;
  std::string cpp_object_api_string_type;
  bool cpp_object_api_string_flexible_constructor;
  CaseStyle cpp_object_api_field_case_style;
  bool cpp_direct_copy;
  bool gen_nullable;
  bool java_checkerframework;
  bool gen_generated;
  bool gen_json_coders;
  std::string object_prefix;
  std::string object_suffix;
  bool union_value_namespacing;
  bool allow_non_utf8;
  bool natural_utf8;
  std::string include_prefix;
  bool keep_prefix;
  bool binary_schema_comments;
  bool binary_schema_builtins;
  bool binary_schema_gen_embed;
  std::string go_import;
  std::string go_namespace;
  bool protobuf_ascii_alike;
  bool size_prefixed;
  std::string root_type;
  bool force_defaults;
  bool java_primitive_has_method;
  bool cs_gen_json_serializer;
  std::vector<std::string> cpp_includes;
  std::string cpp_std;
  bool cpp_static_reflection;
  std::string proto_namespace_suffix;
  std::string filename_suffix;
  std::string filename_extension;
  bool no_warnings;
  bool warnings_as_errors;
  std::string project_root;
  bool cs_global_alias;
  bool json_nested_flatbuffers;
  bool json_nested_flexbuffers;
  bool json_nested_legacy_flatbuffers;
  bool ts_flat_file;
  bool no_leak_private_annotations;
  bool require_json_eof;

  // Possible options for the more general generator below.
  enum Language {
    kJava = 1 << 0,
    kCSharp = 1 << 1,
    kGo = 1 << 2,
    kCpp = 1 << 3,
    kPython = 1 << 5,
    kPhp = 1 << 6,
    kJson = 1 << 7,
    kBinary = 1 << 8,
    kTs = 1 << 9,
    kJsonSchema = 1 << 10,
    kDart = 1 << 11,
    kLua = 1 << 12,
    kLobster = 1 << 13,
    kRust = 1 << 14,
    kKotlin = 1 << 15,
    kSwift = 1 << 16,
    kNim = 1 << 17,
    kMAX
  };

  enum MiniReflect { kNone, kTypes, kTypesAndNames };

  MiniReflect mini_reflect;

  // If set, require all fields in a table to be explicitly numbered.
  bool require_explicit_ids;

  // If set, implement serde::Serialize for generated Rust types
  bool rust_serialize;

  // If set, generate rust types in individual files with a root module file.
  bool rust_module_root_file;

  // The corresponding language bit will be set if a language is included
  // for code generation.
  unsigned long lang_to_generate;

  // If set (default behavior), empty string fields will be set to nullptr to
  // make the flatbuffer more compact.
  bool set_empty_strings_to_null;

  // If set (default behavior), empty vector fields will be set to nullptr to
  // make the flatbuffer more compact.
  bool set_empty_vectors_to_null;

  IDLOptions()
      : gen_jvmstatic(false),
        use_flexbuffers(false),
        strict_json(false),
        output_default_scalars_in_json(false),
        indent_step(2),
        cpp_minify_enums(false),
        output_enum_identifiers(true),
        prefixed_enums(true),
        scoped_enums(false),
        swift_implementation_only(false),
        include_dependence_headers(true),
        mutable_buffer(false),
        one_file(false),
        proto_mode(false),
        proto_oneof_union(false),
        generate_all(false),
        skip_unexpected_fields_in_json(false),
        generate_name_strings(false),
        generate_object_based_api(false),
        gen_compare(false),
        cpp_object_api_pointer_type("std::unique_ptr"),
        cpp_object_api_string_flexible_constructor(false),
        cpp_object_api_field_case_style(CaseStyle_Unchanged),
        cpp_direct_copy(true),
        gen_nullable(false),
        java_checkerframework(false),
        gen_generated(false),
        gen_json_coders(false),
        object_suffix("T"),
        union_value_namespacing(true),
        allow_non_utf8(false),
        natural_utf8(false),
        keep_prefix(false),
        binary_schema_comments(false),
        binary_schema_builtins(false),
        binary_schema_gen_embed(false),
        protobuf_ascii_alike(false),
        size_prefixed(false),
        force_defaults(false),
        java_primitive_has_method(false),
        cs_gen_json_serializer(false),
        cpp_static_reflection(false),
        filename_suffix("_generated"),
        filename_extension(),
        no_warnings(false),
        warnings_as_errors(false),
        project_root(""),
        cs_global_alias(false),
        json_nested_flatbuffers(true),
        json_nested_flexbuffers(true),
        json_nested_legacy_flatbuffers(false),
        ts_flat_file(false),
        no_leak_private_annotations(false),
        require_json_eof(true),
        mini_reflect(IDLOptions::kNone),
        require_explicit_ids(false),
        rust_serialize(false),
        rust_module_root_file(false),
        lang_to_generate(0),
        set_empty_strings_to_null(true),
        set_empty_vectors_to_null(true) {}
};

// This encapsulates where the parser is in the current source file.
struct ParserState {
  ParserState()
      : prev_cursor_(nullptr),
        cursor_(nullptr),
        line_start_(nullptr),
        line_(0),
        token_(-1),
        attr_is_trivial_ascii_string_(true) {}

 protected:
  void ResetState(const char *source) {
    prev_cursor_ = source;
    cursor_ = source;
    line_ = 0;
    MarkNewLine();
  }

  void MarkNewLine() {
    line_start_ = cursor_;
    line_ += 1;
  }

  int64_t CursorPosition() const {
    FLATBUFFERS_ASSERT(cursor_ && line_start_ && cursor_ >= line_start_);
    return static_cast<int64_t>(cursor_ - line_start_);
  }

  const char *prev_cursor_;
  const char *cursor_;
  const char *line_start_;
  int line_;  // the current line being parsed
  int token_;

  // Flag: text in attribute_ is true ASCII string without escape
  // sequences. Only printable ASCII (without [\t\r\n]).
  // Used for number-in-string (and base64 string in future).
  bool attr_is_trivial_ascii_string_;
  std::string attribute_;
  std::vector<std::string> doc_comment_;
};

// A way to make error propagation less error prone by requiring values to be
// checked.
// Once you create a value of this type you must either:
// - Call Check() on it.
// - Copy or assign it to another value.
// Failure to do so leads to an assert.
// This guarantees that this as return value cannot be ignored.
class CheckedError {
 public:
  explicit CheckedError(bool error)
      : is_error_(error), has_been_checked_(false) {}

  CheckedError &operator=(const CheckedError &other) {
    is_error_ = other.is_error_;
    has_been_checked_ = false;
    other.has_been_checked_ = true;
    return *this;
  }

  CheckedError(const CheckedError &other) {
    *this = other;  // Use assignment operator.
  }

  ~CheckedError() { FLATBUFFERS_ASSERT(has_been_checked_); }

  bool Check() {
    has_been_checked_ = true;
    return is_error_;
  }

 private:
  bool is_error_;
  mutable bool has_been_checked_;
};

// Additionally, in GCC we can get these errors statically, for additional
// assurance:
// clang-format off
#ifdef __GNUC__
#define FLATBUFFERS_CHECKED_ERROR CheckedError \
          __attribute__((warn_unused_result))
#else
#define FLATBUFFERS_CHECKED_ERROR CheckedError
#endif
// clang-format on

class Parser : public ParserState {
 public:
  explicit Parser(const IDLOptions &options = IDLOptions())
      : current_namespace_(nullptr),
        empty_namespace_(nullptr),
        flex_builder_(256, flexbuffers::BUILDER_FLAG_SHARE_ALL),
        root_struct_def_(nullptr),
        opts(options),
        uses_flexbuffers_(false),
        has_warning_(false),
        advanced_features_(0),
        source_(nullptr),
        anonymous_counter_(0),
        parse_depth_counter_(0) {
    if (opts.force_defaults) { builder_.ForceDefaults(true); }
    // Start out with the empty namespace being current.
    empty_namespace_ = new Namespace();
    namespaces_.push_back(empty_namespace_);
    current_namespace_ = empty_namespace_;
    known_attributes_["deprecated"] = true;
    known_attributes_["required"] = true;
    known_attributes_["key"] = true;
    known_attributes_["shared"] = true;
    known_attributes_["hash"] = true;
    known_attributes_["id"] = true;
    known_attributes_["force_align"] = true;
    known_attributes_["bit_flags"] = true;
    known_attributes_["original_order"] = true;
    known_attributes_["nested_flatbuffer"] = true;
    known_attributes_["csharp_partial"] = true;
    known_attributes_["streaming"] = true;
    known_attributes_["idempotent"] = true;
    known_attributes_["cpp_type"] = true;
    known_attributes_["cpp_ptr_type"] = true;
    known_attributes_["cpp_ptr_type_get"] = true;
    known_attributes_["cpp_str_type"] = true;
    known_attributes_["cpp_str_flex_ctor"] = true;
    known_attributes_["native_inline"] = true;
    known_attributes_["native_custom_alloc"] = true;
    known_attributes_["native_type"] = true;
    known_attributes_["native_type_pack_name"] = true;
    known_attributes_["native_default"] = true;
    known_attributes_["flexbuffer"] = true;
    known_attributes_["private"] = true;
  }

  ~Parser() {
    for (auto it = namespaces_.begin(); it != namespaces_.end(); ++it) {
      delete *it;
    }
  }

  // Parse the string containing either schema or JSON data, which will
  // populate the SymbolTable's or the FlatBufferBuilder above.
  // include_paths is used to resolve any include statements, and typically
  // should at least include the project path (where you loaded source_ from).
  // include_paths must be nullptr terminated if specified.
  // If include_paths is nullptr, it will attempt to load from the current
  // directory.
  // If the source was loaded from a file and isn't an include file,
  // supply its name in source_filename.
  // All paths specified in this call must be in posix format, if you accept
  // paths from user input, please call PosixPath on them first.
  bool Parse(const char *_source, const char **include_paths = nullptr,
             const char *source_filename = nullptr);

  bool ParseJson(const char *json, const char *json_filename = nullptr);

  // Returns the number of characters were consumed when parsing a JSON string.
  std::ptrdiff_t BytesConsumed() const;

  // Set the root type. May override the one set in the schema.
  bool SetRootType(const char *name);

  // Mark all definitions as already having code generated.
  void MarkGenerated();

  // Get the files recursively included by the given file. The returned
  // container will have at least the given file.
  std::set<std::string> GetIncludedFilesRecursive(
      const std::string &file_name) const;

  // Fills builder_ with a binary version of the schema parsed.
  // See reflection/reflection.fbs
  void Serialize();

  // Deserialize a schema buffer
  bool Deserialize(const uint8_t *buf, const size_t size);

  // Fills internal structure as if the schema passed had been loaded by parsing
  // with Parse except that included filenames will not be populated.
  bool Deserialize(const reflection::Schema *schema);

  Type *DeserializeType(const reflection::Type *type);

  // Checks that the schema represented by this parser is a safe evolution
  // of the schema provided. Returns non-empty error on any problems.
  std::string ConformTo(const Parser &base);

  // Similar to Parse(), but now only accepts JSON to be parsed into a
  // FlexBuffer.
  bool ParseFlexBuffer(const char *source, const char *source_filename,
                       flexbuffers::Builder *builder);

  StructDef *LookupStruct(const std::string &id) const;
  StructDef *LookupStructThruParentNamespaces(const std::string &id) const;

  std::string UnqualifiedName(const std::string &fullQualifiedName);

  FLATBUFFERS_CHECKED_ERROR Error(const std::string &msg);

  // @brief Verify that any of 'opts.lang_to_generate' supports Optional scalars
  // in a schema.
  // @param opts Options used to parce a schema and generate code.
  static bool SupportsOptionalScalars(const flatbuffers::IDLOptions &opts);

  // Get the set of included files that are directly referenced by the file
  // being parsed. This does not include files that are transitively included by
  // others includes.
  std::vector<IncludedFile> GetIncludedFiles() const;

 private:
  class ParseDepthGuard;

  void Message(const std::string &msg);
  void Warning(const std::string &msg);
  FLATBUFFERS_CHECKED_ERROR ParseHexNum(int nibbles, uint64_t *val);
  FLATBUFFERS_CHECKED_ERROR Next();
  FLATBUFFERS_CHECKED_ERROR SkipByteOrderMark();
  bool Is(int t) const;
  bool IsIdent(const char *id) const;
  FLATBUFFERS_CHECKED_ERROR Expect(int t);
  std::string TokenToStringId(int t) const;
  EnumDef *LookupEnum(const std::string &id);
  FLATBUFFERS_CHECKED_ERROR ParseNamespacing(std::string *id,
                                             std::string *last);
  FLATBUFFERS_CHECKED_ERROR ParseTypeIdent(Type &type);
  FLATBUFFERS_CHECKED_ERROR ParseType(Type &type);
  FLATBUFFERS_CHECKED_ERROR AddField(StructDef &struct_def,
                                     const std::string &name, const Type &type,
                                     FieldDef **dest);
  FLATBUFFERS_CHECKED_ERROR ParseField(StructDef &struct_def);
  FLATBUFFERS_CHECKED_ERROR ParseString(Value &val, bool use_string_pooling);
  FLATBUFFERS_CHECKED_ERROR ParseComma();
  FLATBUFFERS_CHECKED_ERROR ParseAnyValue(Value &val, FieldDef *field,
                                          size_t parent_fieldn,
                                          const StructDef *parent_struct_def,
                                          uoffset_t count,
                                          bool inside_vector = false);
  template<typename F>
  FLATBUFFERS_CHECKED_ERROR ParseTableDelimiters(size_t &fieldn,
                                                 const StructDef *struct_def,
                                                 F body);
  FLATBUFFERS_CHECKED_ERROR ParseTable(const StructDef &struct_def,
                                       std::string *value, uoffset_t *ovalue);
  void SerializeStruct(const StructDef &struct_def, const Value &val);
  void SerializeStruct(FlatBufferBuilder &builder, const StructDef &struct_def,
                       const Value &val);
  template<typename F>
  FLATBUFFERS_CHECKED_ERROR ParseVectorDelimiters(uoffset_t &count, F body);
  FLATBUFFERS_CHECKED_ERROR ParseVector(const Type &type, uoffset_t *ovalue,
                                        FieldDef *field, size_t fieldn);
  FLATBUFFERS_CHECKED_ERROR ParseArray(Value &array);
  FLATBUFFERS_CHECKED_ERROR ParseNestedFlatbuffer(
      Value &val, FieldDef *field, size_t fieldn,
      const StructDef *parent_struct_def);
  FLATBUFFERS_CHECKED_ERROR ParseMetaData(SymbolTable<Value> *attributes);
  FLATBUFFERS_CHECKED_ERROR TryTypedValue(const std::string *name, int dtoken,
                                          bool check, Value &e, BaseType req,
                                          bool *destmatch);
  FLATBUFFERS_CHECKED_ERROR ParseHash(Value &e, FieldDef *field);
  FLATBUFFERS_CHECKED_ERROR TokenError();
  FLATBUFFERS_CHECKED_ERROR ParseSingleValue(const std::string *name, Value &e,
                                             bool check_now);
  FLATBUFFERS_CHECKED_ERROR ParseFunction(const std::string *name, Value &e);
  FLATBUFFERS_CHECKED_ERROR ParseEnumFromString(const Type &type,
                                                std::string *result);
  StructDef *LookupCreateStruct(const std::string &name,
                                bool create_if_new = true,
                                bool definition = false);
  FLATBUFFERS_CHECKED_ERROR ParseEnum(bool is_union, EnumDef **dest,
                                      const char *filename);
  FLATBUFFERS_CHECKED_ERROR ParseNamespace();
  FLATBUFFERS_CHECKED_ERROR StartStruct(const std::string &name,
                                        StructDef **dest);
  FLATBUFFERS_CHECKED_ERROR StartEnum(const std::string &name, bool is_union,
                                      EnumDef **dest);
  FLATBUFFERS_CHECKED_ERROR ParseDecl(const char *filename);
  FLATBUFFERS_CHECKED_ERROR ParseService(const char *filename);
  FLATBUFFERS_CHECKED_ERROR ParseProtoFields(StructDef *struct_def,
                                             bool isextend, bool inside_oneof);
  FLATBUFFERS_CHECKED_ERROR ParseProtoMapField(StructDef *struct_def);
  FLATBUFFERS_CHECKED_ERROR ParseProtoOption();
  FLATBUFFERS_CHECKED_ERROR ParseProtoKey();
  FLATBUFFERS_CHECKED_ERROR ParseProtoDecl();
  FLATBUFFERS_CHECKED_ERROR ParseProtoCurliesOrIdent();
  FLATBUFFERS_CHECKED_ERROR ParseTypeFromProtoType(Type *type);
  FLATBUFFERS_CHECKED_ERROR SkipAnyJsonValue();
  FLATBUFFERS_CHECKED_ERROR ParseFlexBufferNumericConstant(
      flexbuffers::Builder *builder);
  FLATBUFFERS_CHECKED_ERROR ParseFlexBufferValue(flexbuffers::Builder *builder);
  FLATBUFFERS_CHECKED_ERROR StartParseFile(const char *source,
                                           const char *source_filename);
  FLATBUFFERS_CHECKED_ERROR ParseRoot(const char *_source,
                                      const char **include_paths,
                                      const char *source_filename);
  FLATBUFFERS_CHECKED_ERROR CheckPrivateLeak();
  FLATBUFFERS_CHECKED_ERROR CheckPrivatelyLeakedFields(
      const Definition &def, const Definition &value_type);
  FLATBUFFERS_CHECKED_ERROR DoParse(const char *_source,
                                    const char **include_paths,
                                    const char *source_filename,
                                    const char *include_filename);
  FLATBUFFERS_CHECKED_ERROR DoParseJson();
  FLATBUFFERS_CHECKED_ERROR CheckClash(std::vector<FieldDef *> &fields,
                                       StructDef *struct_def,
                                       const char *suffix, BaseType baseType);
  FLATBUFFERS_CHECKED_ERROR ParseAlignAttribute(
      const std::string &align_constant, size_t min_align, size_t *align);

  bool SupportsAdvancedUnionFeatures() const;
  bool SupportsAdvancedArrayFeatures() const;
  bool SupportsOptionalScalars() const;
  bool SupportsDefaultVectorsAndStrings() const;
  Namespace *UniqueNamespace(Namespace *ns);

  FLATBUFFERS_CHECKED_ERROR RecurseError();
  template<typename F> CheckedError Recurse(F f);

  const std::string &GetPooledString(const std::string &s) const;

 public:
  SymbolTable<Type> types_;
  SymbolTable<StructDef> structs_;
  SymbolTable<EnumDef> enums_;
  SymbolTable<ServiceDef> services_;
  std::vector<Namespace *> namespaces_;
  Namespace *current_namespace_;
  Namespace *empty_namespace_;
  std::string error_;  // User readable error_ if Parse() == false

  FlatBufferBuilder builder_;  // any data contained in the file
  flexbuffers::Builder flex_builder_;
  flexbuffers::Reference flex_root_;
  StructDef *root_struct_def_;
  std::string file_identifier_;
  std::string file_extension_;

  std::map<uint64_t, std::string> included_files_;
  std::map<std::string, std::set<IncludedFile>> files_included_per_file_;
  std::vector<std::string> native_included_files_;

  std::map<std::string, bool> known_attributes_;

  IDLOptions opts;
  bool uses_flexbuffers_;
  bool has_warning_;

  uint64_t advanced_features_;

  std::string file_being_parsed_;

 private:
  const char *source_;

  std::vector<std::pair<Value, FieldDef *>> field_stack_;

  // TODO(cneo): Refactor parser to use string_cache more often to save
  // on memory usage.
  mutable std::set<std::string> string_cache_;

  int anonymous_counter_;
  int parse_depth_counter_;  // stack-overflow guard
};

// Utility functions for multiple generators:

// Generate text (JSON) from a given FlatBuffer, and a given Parser
// object that has been populated with the corresponding schema.
// If ident_step is 0, no indentation will be generated. Additionally,
// if it is less than 0, no linefeeds will be generated either.
// See idl_gen_text.cpp.
// strict_json adds "quotes" around field names if true.
// If the flatbuffer cannot be encoded in JSON (e.g., it contains non-UTF-8
// byte arrays in String values), returns false.
extern bool GenerateTextFromTable(const Parser &parser, const void *table,
                                  const std::string &tablename,
                                  std::string *text);
extern bool GenerateText(const Parser &parser, const void *flatbuffer,
                         std::string *text);
extern bool GenerateTextFile(const Parser &parser, const std::string &path,
                             const std::string &file_name);

// Generate Json schema to string
// See idl_gen_json_schema.cpp.
extern bool GenerateJsonSchema(const Parser &parser, std::string *json);

// Generate binary files from a given FlatBuffer, and a given Parser
// object that has been populated with the corresponding schema.
// See code_generators.cpp.
extern bool GenerateBinary(const Parser &parser, const std::string &path,
                           const std::string &file_name);

// Generate a C++ header from the definitions in the Parser object.
// See idl_gen_cpp.
extern bool GenerateCPP(const Parser &parser, const std::string &path,
                        const std::string &file_name);

// Generate C# files from the definitions in the Parser object.
// See idl_gen_csharp.cpp.
extern bool GenerateCSharp(const Parser &parser, const std::string &path,
                           const std::string &file_name);

extern bool GenerateDart(const Parser &parser, const std::string &path,
                         const std::string &file_name);

// Generate Java files from the definitions in the Parser object.
// See idl_gen_java.cpp.
extern bool GenerateJava(const Parser &parser, const std::string &path,
                         const std::string &file_name);

// Generate JavaScript or TypeScript code from the definitions in the Parser
// object. See idl_gen_js.
extern bool GenerateTS(const Parser &parser, const std::string &path,
                       const std::string &file_name);

// Generate Go files from the definitions in the Parser object.
// See idl_gen_go.cpp.
extern bool GenerateGo(const Parser &parser, const std::string &path,
                       const std::string &file_name);

// Generate Php code from the definitions in the Parser object.
// See idl_gen_php.
extern bool GeneratePhp(const Parser &parser, const std::string &path,
                        const std::string &file_name);

// Generate Python files from the definitions in the Parser object.
// See idl_gen_python.cpp.
extern bool GeneratePython(const Parser &parser, const std::string &path,
                           const std::string &file_name);

// Generate Lobster files from the definitions in the Parser object.
// See idl_gen_lobster.cpp.
extern bool GenerateLobster(const Parser &parser, const std::string &path,
                            const std::string &file_name);

// Generate Lua files from the definitions in the Parser object.
// See idl_gen_lua.cpp.
extern bool GenerateLua(const Parser &parser, const std::string &path,
                        const std::string &file_name);

// Generate Rust files from the definitions in the Parser object.
// See idl_gen_rust.cpp.
extern bool GenerateRust(const Parser &parser, const std::string &path,
                         const std::string &file_name);

// Generate Json schema file
// See idl_gen_json_schema.cpp.
extern bool GenerateJsonSchema(const Parser &parser, const std::string &path,
                               const std::string &file_name);

extern bool GenerateKotlin(const Parser &parser, const std::string &path,
                           const std::string &file_name);

// Generate Swift classes.
// See idl_gen_swift.cpp
extern bool GenerateSwift(const Parser &parser, const std::string &path,
                          const std::string &file_name);

// Generate a schema file from the internal representation, useful after
// parsing a .proto schema.
extern std::string GenerateFBS(const Parser &parser,
                               const std::string &file_name);
extern bool GenerateFBS(const Parser &parser, const std::string &path,
                        const std::string &file_name);

// Generate a make rule for the generated TypeScript code.
// See idl_gen_ts.cpp.
extern std::string TSMakeRule(const Parser &parser, const std::string &path,
                              const std::string &file_name);

// Generate a make rule for the generated C++ header.
// See idl_gen_cpp.cpp.
extern std::string CPPMakeRule(const Parser &parser, const std::string &path,
                               const std::string &file_name);

// Generate a make rule for the generated Dart code
// see idl_gen_dart.cpp
extern std::string DartMakeRule(const Parser &parser, const std::string &path,
                                const std::string &file_name);

// Generate a make rule for the generated Rust code.
// See idl_gen_rust.cpp.
extern std::string RustMakeRule(const Parser &parser, const std::string &path,
                                const std::string &file_name);

// Generate a make rule for generated Java or C# files.
// See code_generators.cpp.
extern std::string CSharpMakeRule(const Parser &parser, const std::string &path,
                                  const std::string &file_name);
extern std::string JavaMakeRule(const Parser &parser, const std::string &path,
                                const std::string &file_name);

// Generate a make rule for the generated text (JSON) files.
// See idl_gen_text.cpp.
extern std::string TextMakeRule(const Parser &parser, const std::string &path,
                                const std::string &file_names);

// Generate a make rule for the generated binary files.
// See code_generators.cpp.
extern std::string BinaryMakeRule(const Parser &parser, const std::string &path,
                                  const std::string &file_name);

// Generate GRPC Cpp interfaces.
// See idl_gen_grpc.cpp.
bool GenerateCppGRPC(const Parser &parser, const std::string &path,
                     const std::string &file_name);

// Generate GRPC Go interfaces.
// See idl_gen_grpc.cpp.
bool GenerateGoGRPC(const Parser &parser, const std::string &path,
                    const std::string &file_name);

// Generate GRPC Java classes.
// See idl_gen_grpc.cpp
bool GenerateJavaGRPC(const Parser &parser, const std::string &path,
                      const std::string &file_name);

// Generate GRPC Python interfaces.
// See idl_gen_grpc.cpp.
bool GeneratePythonGRPC(const Parser &parser, const std::string &path,
                        const std::string &file_name);

// Generate GRPC Swift interfaces.
// See idl_gen_grpc.cpp.
extern bool GenerateSwiftGRPC(const Parser &parser, const std::string &path,
                              const std::string &file_name);

extern bool GenerateTSGRPC(const Parser &parser, const std::string &path,
                           const std::string &file_name);

extern bool GenerateRustModuleRootFile(const Parser &parser,
                                       const std::string &path);
}  // namespace flatbuffers

#endif  // FLATBUFFERS_IDL_H_