diff options
author | Jacky Romano <jr@graphtech.co.il> | 2011-03-16 14:31:38 +0200 |
---|---|---|
committer | Jacky Romano <jr@graphtech.co.il> | 2011-03-16 14:31:38 +0200 |
commit | 770db134b5a4dcbc6793c214db3b048aafa6c066 (patch) | |
tree | a370c6b7bd0811b2aae473cb07504707502aa408 /emulator/opengl/host/tools/emugen/ApiGen.h | |
parent | d5c2b8a71dd3c0d6128d74749b68eae439978241 (diff) | |
download | sdk-770db134b5a4dcbc6793c214db3b048aafa6c066.zip sdk-770db134b5a4dcbc6793c214db3b048aafa6c066.tar.gz sdk-770db134b5a4dcbc6793c214db3b048aafa6c066.tar.bz2 |
Removing emulator/opengl from the sdk.git
This project code is moving to live under development.git/tools/emulator
Change-Id: I3f7673bc17681a0ffa14bb0b4d0880977b77f24d
Diffstat (limited to 'emulator/opengl/host/tools/emugen/ApiGen.h')
-rw-r--r-- | emulator/opengl/host/tools/emugen/ApiGen.h | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/emulator/opengl/host/tools/emugen/ApiGen.h b/emulator/opengl/host/tools/emugen/ApiGen.h deleted file mode 100644 index 3c7fd27..0000000 --- a/emulator/opengl/host/tools/emugen/ApiGen.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -* Copyright (C) 2011 The Android Open Source Project -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -#ifndef __API_GEN_H_ -#define __API_GEN_H_ - -#include <vector> -#include <string.h> -#include "EntryPoint.h" - - -class ApiGen : public std::vector<EntryPoint> { - -public: - typedef std::vector<std::string> StringVec; - typedef enum { CLIENT_SIDE, SERVER_SIDE } SideType; - - ApiGen(const std::string & basename) : - m_basename(basename), - m_maxEntryPointsParams(0), - m_baseOpcode(0) - { } - virtual ~ApiGen() {} - int readSpec(const std::string & filename); - int readAttributes(const std::string & attribFilename); - size_t maxEntryPointsParams() { return m_maxEntryPointsParams; } - void updateMaxEntryPointsParams(size_t val) { - if (m_maxEntryPointsParams == 0 || val > m_maxEntryPointsParams) m_maxEntryPointsParams = val; - } - int baseOpcode() { return m_baseOpcode; } - void setBaseOpcode(int base) { m_baseOpcode = base; } - - const char *sideString(SideType side) { return (side == CLIENT_SIDE) ? "client" : "server"; } - - StringVec & clientContextHeaders() { return m_clientContextHeaders; } - StringVec & encoderHeaders() { return m_encoderHeaders; } - StringVec & serverContextHeaders() { return m_serverContextHeaders; } - StringVec & decoderHeaders() { return m_decoderHeaders; } - - EntryPoint * findEntryByName(const std::string & name); - int genOpcodes(const std::string &filename); - int genAttributesTemplate(const std::string &filename); - int genProcTypes(const std::string &filename, SideType side); - - int genContext(const std::string &filename, SideType side); - int genClientEntryPoints(const std::string &filename); - - int genEncoderHeader(const std::string &filename); - int genEncoderImpl(const std::string &filename); - - int genDecoderHeader(const std::string &filename); - int genDecoderImpl(const std::string &filename); - -protected: - virtual void printHeader(FILE *fp) const; - std::string m_basename; - StringVec m_clientContextHeaders; - StringVec m_encoderHeaders; - StringVec m_serverContextHeaders; - StringVec m_decoderHeaders; - size_t m_maxEntryPointsParams; // record the maximum number of parameters in the entry points; - int m_baseOpcode; - int setGlobalAttribute(const std::string & line, size_t lc); -}; - -#endif |