/usr/include/bulletml/bulletmlparser.h is in libbulletml-dev 0.0.6-6.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | /// BulletML �̃p�[�T
/**
* c++ �p RELAX �����������̂ł܂������ō�邱�Ƃ�
*/
#ifndef BULLETMLPARSER_H_
#define BULLETMLPARSER_H_
#include "bulletmltree.h"
#include "bulletmlcommon.h"
#include <string>
#include <vector>
#include <stdio.h>
class BulletMLParser {
protected:
typedef std::vector<std::string> MyAttributes;
typedef MyAttributes::const_iterator MyAttributeIte;
public:
DECLSPEC BulletMLParser();
DECLSPEC virtual ~BulletMLParser();
public:
DECLSPEC void build();
DECLSPEC virtual void parse() =0;
public:
/**
* BulletML �͎d�l��c���[�\���̍�����������K�v�͂Ȃ�
* ���x�����炱���̂ݎ���Ηǂ�
*/
//@{
DECLSPEC BulletMLNode* getBulletRef(int id);
DECLSPEC BulletMLNode* getActionRef(int id);
DECLSPEC BulletMLNode* getFireRef(int id);
//@}
DECLSPEC const std::vector<BulletMLNode*>& getTopActions() const {
return topActions_;
}
DECLSPEC void setHorizontal() { isHorizontal_ = true; }
DECLSPEC bool isHorizontal() const { return isHorizontal_; }
protected:
BulletMLNode* addContent(const std::string& name);
void addAttribute(const MyAttributes& attr, BulletMLNode* elem);
protected:
/// �����gcc�̃o�[�W�����Ԃ̌݊��̂��߂Ȃ̂���
template <class Char_>
std::string uc2string(Char_* src, size_t len = std::string::npos);
protected:
BulletMLNode* bulletml_;
std::vector<BulletMLNode*> topActions_;
typedef std::vector<BulletMLNode*> MyMap;
typedef MyMap BulletMap;
typedef MyMap ActionMap;
typedef MyMap FireMap;
BulletMap bulletMap_;
ActionMap actionMap_;
FireMap fireMap_;
bool isHorizontal_;
protected:
void setName(const char* name) { name_ = name; }
const char* name_;
public:
DECLSPEC const char* getName() const { return name_; }
};
template <class Char_>
std::string BulletMLParser::uc2string(Char_* src, size_t len) {
std::string dst;
size_t i = 0;
while (i != len && *src != '\0') {
dst += *src;
src++;
i++;
}
return dst;
}
#endif // ! BULLETMLPARSER_H_
|