// file: $isip/class/search/HierarchicalDigraph/HierarchicalDigraph.h // // make sure definitions are only made once // #ifndef ISIP_HIERARCHICAL_DIGRAPH #define ISIP_HIERARCHICAL_DIGRAPH // isip include files // #ifndef ISIP_VECTOR #include #endif #ifndef ISIP_SEARCH_LEVEL #include #endif // HierarchicalDigraph: encapsulates the SearchLevel vector // used to represent a language model. // class HierarchicalDigraph : public Vector { //--------------------------------------------------------------------------- // // public constants // //--------------------------------------------------------------------------- public: // declare the class name // static const String CLASS_NAME; //-------------------------------------------------------------- // // other important constants // //-------------------------------------------------------------- enum SOURCE_FORMAT { UNKNOWN = 0, IHD, JSGF, XML, DEF_SRC_FORMAT = IHD }; // define static NameMap objects // static const NameMap SRC_MAP; //---------------------------------------- // // error codes // //---------------------------------------- static const int32 ERR = 100100; //--------------------------------------------------------------------------- // // protected data // //--------------------------------------------------------------------------- protected: static Integral::DEBUG debug_level_d; SOURCE_FORMAT source_format_d; // static memory manager // static MemoryManager mgr_d; //--------------------------------------------------------------------------- // // required public methods // //--------------------------------------------------------------------------- public: // method: name // static const String& name() { return CLASS_NAME; } // other static methods // static bool8 diagnose(Integral::DEBUG debug_level); // debug methods // bool8 debug(const unichar* msg) const; // method: destructor // ~HierarchicalDigraph() {} // method: default constructor // HierarchicalDigraph() {} // method: copy constructor // HierarchicalDigraph(const HierarchicalDigraph& copy) { assign(copy); } // assign methods // bool8 assign(const HierarchicalDigraph& arg); // i/o methods // int32 sofSize() const; bool8 read(Sof& sof, int32 tag, const String& name = CLASS_NAME); bool8 write(Sof& sof, int32 tag, const String& name = CLASS_NAME) const; // equality methods // bool8 eq(const HierarchicalDigraph& arg) const; // memory managements methods // bool8 clear(Integral::CMODE cmode = Integral::DEF_CMODE); //------------------------------------------------------------- // // class-specified set and get methods // //------------------------------------------------------------- // method: getSrcFormat // SOURCE_FORMAT getSrcFormat() { return source_format_d; } // method: setSrcFormat // bool8 setSrcFormat(SOURCE_FORMAT source_format) { source_format_d = source_format; return true; } }; // end of include file // #endif