Code::Blocks  SVN r11506
sc_base_types.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3  * http://www.gnu.org/licenses/lgpl-3.0.html
4  */
5 
6 #ifndef SC_BASE_TYPES_H
7 #define SC_BASE_TYPES_H
8 
9 #include <wx/string.h>
10 #include <wx/arrstr.h>
11 
12 #include <globals.h>
13 #include <settings.h>
14 #include <manager.h>
15 #include <logmanager.h>
16 #include <configmanager.h>
17 #include <editormanager.h>
18 #include <projectmanager.h>
19 #include <macrosmanager.h>
20 #include <uservarmanager.h>
21 #include <pluginmanager.h>
22 #include <scriptingmanager.h>
23 #include <compilerfactory.h>
24 #include <compiletargetbase.h>
25 #include <cbproject.h>
26 #include <cbeditor.h>
27 #include <sqplus.h>
28 
29 // wx primitives and types
36 
37 // C::B primitives and types
54 
55 // make SqPlus aware of enum-type arguments
56 #define DECLARE_ENUM_TYPE(T) \
57 namespace SqPlus \
58 { \
59  inline void Push(HSQUIRRELVM v,T value) { sq_pushinteger(v,value); } \
60  inline bool Match(TypeWrapper<T>, HSQUIRRELVM v, int idx) { return sq_gettype(v,idx) == OT_INTEGER; } \
61  inline T Get(TypeWrapper<T>,HSQUIRRELVM v,int idx) { SQInteger i; SQPLUS_CHECK_GET(sq_getinteger(v,idx,&i)); return (T)i; } \
62 }
63 
77 using SqPlus::Push;
78 
79 namespace SqPlus
80 {
81  // make SqPlus aware of wxString arguments
82 // inline void Push(HSQUIRRELVM v,const wxString& value) { sq_pushstring(v,cbU2C(value),-1); }
83 // inline bool Match(TypeWrapper<const wxString&>, HSQUIRRELVM v, int idx) { return sq_gettype(v,idx) == OT_STRING; }
84 // inline wxString Get(TypeWrapper<const wxString&>,HSQUIRRELVM v,int idx) { const SQChar * s; SQPLUS_CHECK_GET(sq_getstring(v,idx,&s)); return cbC2U(s); }
85 
86  // type info for short unsigned int (missing from SqPlus)
87  template<>
88  struct TypeInfo<unsigned short>
89  {
90  const SQChar * typeName;
91  TypeInfo() : typeName(sqT("int")) {}
92  enum {TypeID=VAR_TYPE_INT,Size=sizeof(unsigned short)};
93  operator ScriptVarType() { return ScriptVarType(TypeID); }
94  };
95 #ifdef _SQ64
96  template<>
97  struct TypeInfo<SQInt32>
98  {
99  const SQChar * typeName;
100  TypeInfo() : typeName(sqT("int")) {}
101  enum {TypeID=VAR_TYPE_INT,Size=sizeof(SQInt32)};
102  operator ScriptVarType() { return ScriptVarType(TypeID); }
103  };
104 #endif
105 }
106 
107 #endif // SC_BASE_TYPES_H
TargetFilenameGenerationPolicy
A target&#39;s filename can either be auto-generated based on the running platform, or completely specifi...
MakeCommand
Information about the plugin.
Definition: pluginmanager.h:38
FileTreeDataKind
The kind of tree node.
Definition: cbproject.h:41
PrintColourMode
PCHMode
Precompiled headers mode.
Definition: cbproject.h:83
Represents a file in a Code::Blocks project.
Definition: projectfile.h:39
const SQChar * GetTypeName(const SQObjectPtr &obj1)
Definition: sqobject.cpp:43
Represents a Code::Blocks project.
Definition: cbproject.h:96
ModuleType
The type of module offering a context menu.
Definition: globals.h:38
wxPathFormat
OptionsRelation
Option&#39;s relation.
Base class that all "editors" should inherit from.
Definition: editorbase.h:30
This is a base class for all classes needing compilation parameters.
TemplateOutputType
Template output types.
Definition: globals.h:145
A file editor.
Definition: cbeditor.h:43
DECLARE_INSTANCE_TYPE(wxArrayString)
The entry point singleton for working with projects.
Provides scripting in Code::Blocks.
char SQChar
SearchDirs
Search dirs values.
Definition: configmanager.h:64
wxPathNormalize
Represents a Code::Blocks project build target.
TargetType
Enum to define the type of output the target produces.
OptionsRelationType
Enum that defines the option&#39;s relation types.
#define DECLARE_ENUM_TYPE(T)
Definition: sc_base_types.h:56
Base class for build target classes Each Code::Blocks project consists of at least one target...