WORM 0.2
A C++ DAL/ORM code generation framework

src/orm/wormcodetemplate.h

Go to the documentation of this file.
00001 /*
00002     WORM - a DAL/ORM code generation framework
00003     Copyright (C) 2011  Erik Winn <sidewalksoftware@gmail.com>
00004 
00005     This program is free software: you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation, either version 3 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017 */
00018 
00019 
00020 #ifndef WORMCODETEMPLATE_H
00021 #define WORMCODETEMPLATE_H
00022 #include <string>
00023 
00024 namespace WSql {
00025     
00026 class WormCodeTemplate
00027 {
00028     
00029     public:
00030         enum Type{
00031             Unknown,
00032             ClassDeclarationBase,               //class_declaration_base.tpl
00033             ClassDefinitionBase,                  //class_definition_base.tpl
00034             ClassDeclaration,                       //class_declaration.tpl
00035             ClassDefinition,                          //class_definition.tpl
00036             EditViewDeclarationBase,       //edit_view_declaration_base.tpl
00037             EditViewDeclaration,                //edit_view_declaration.tpl
00038             EditViewDefinitionBase,          //edit_view_definition_base.tpl
00039             EditViewDefinition,                  //edit_view_definition.tpl
00040             ListViewDeclarationBase,       //list_view_declaration_base.tpl
00041             ListViewDeclaration,               //list_view_declaration.tpl
00042             ListViewDefinitionBase,          //list_view_definition_base.tpl
00043             ListViewDefinition                   //list_view_definition.tpl
00044         };
00045         
00046         WormCodeTemplate();
00047         WormCodeTemplate( const WormCodeTemplate& other );
00048         virtual ~WormCodeTemplate();
00049         virtual WormCodeTemplate& operator=( const WormCodeTemplate& other );
00050         virtual bool operator==( const WormCodeTemplate& other ) const;
00051 
00052         const Type& type()const{return _type;}
00053         const std::string& uri(){return _uri;};
00054         const std::string& content()const{return _content;}
00055         void setContent(const std::string content){_content=content;}
00056         void setType(Type t){_type=t;}
00057         void setUri(const std::string& uri);
00058         
00059     private:
00060         Type _type;
00061         std::string _uri; //AKA, filename for current purposes ..
00062         std::string _content;
00063 };
00064 
00065 } //namespace WSql
00066 
00067 #endif // WORMCODETEMPLATE_H
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Defines