Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
55826685
Commit
55826685
authored
Jun 06, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CAPNPROTO_ -> CAPNP_
parent
f1b07de7
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
120 additions
and
120 deletions
+120
-120
arena.c++
c++/src/capnp/arena.c++
+1
-1
arena.h
c++/src/capnp/arena.h
+4
-4
capnproto-common.h
c++/src/capnp/benchmark/capnproto-common.h
+3
-3
common.h
c++/src/capnp/benchmark/common.h
+3
-3
blob.h
c++/src/capnp/blob.h
+3
-3
common.h
c++/src/capnp/common.h
+3
-3
dynamic.h
c++/src/capnp/dynamic.h
+54
-54
generated-header-support.h
c++/src/capnp/generated-header-support.h
+11
-11
layout-test.c++
c++/src/capnp/layout-test.c++
+1
-1
layout.c++
c++/src/capnp/layout.c++
+1
-1
layout.h
c++/src/capnp/layout.h
+3
-3
list.h
c++/src/capnp/list.h
+3
-3
message.c++
c++/src/capnp/message.c++
+1
-1
message.h
c++/src/capnp/message.h
+3
-3
schema-loader.c++
c++/src/capnp/schema-loader.c++
+1
-1
schema-loader.h
c++/src/capnp/schema-loader.h
+3
-3
schema.h
c++/src/capnp/schema.h
+3
-3
serialize-packed.h
c++/src/capnp/serialize-packed.h
+3
-3
serialize-snappy.h
c++/src/capnp/serialize-snappy.h
+3
-3
serialize.h
c++/src/capnp/serialize.h
+2
-2
test-util.h
c++/src/capnp/test-util.h
+2
-2
CxxGenerator.hs
compiler/src/CxxGenerator.hs
+1
-1
c++-header.mustache
compiler/src/c++-header.mustache
+4
-4
c++-source.mustache
compiler/src/c++-source.mustache
+4
-4
No files found.
c++/src/capnp/arena.c++
View file @
55826685
...
...
@@ -21,7 +21,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CAPNP
ROTO
_PRIVATE
#define CAPNP_PRIVATE
#include "arena.h"
#include "message.h"
#include <kj/debug.h>
...
...
c++/src/capnp/arena.h
View file @
55826685
...
...
@@ -21,10 +21,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CAPNP
ROTO
_ARENA_H_
#define CAPNP
ROTO
_ARENA_H_
#ifndef CAPNP_ARENA_H_
#define CAPNP_ARENA_H_
#ifndef CAPNP
ROTO
_PRIVATE
#ifndef CAPNP_PRIVATE
#error "This header is only meant to be included by Cap'n Proto's own source code."
#endif
...
...
@@ -298,4 +298,4 @@ inline void SegmentBuilder::reset() {
}
// namespace internal
}
// namespace capnp
#endif // CAPNP
ROTO
_ARENA_H_
#endif // CAPNP_ARENA_H_
c++/src/capnp/benchmark/capnproto-common.h
View file @
55826685
...
...
@@ -21,8 +21,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CAPNP
ROTO_BENCHMARK_CAPNPROTO
_COMMON_H_
#define CAPNP
ROTO_BENCHMARK_CAPNPROTO
_COMMON_H_
#ifndef CAPNP
_BENCHMARK_CAPNP
_COMMON_H_
#define CAPNP
_BENCHMARK_CAPNP
_COMMON_H_
#include "common.h"
#include <capnp/serialize.h>
...
...
@@ -418,4 +418,4 @@ struct BenchmarkTypes {
}
// namespace benchmark
}
// namespace capnp
#endif // CAPNP
ROTO_BENCHMARK_CAPNPROTO
_COMMON_H_
#endif // CAPNP
_BENCHMARK_CAPNP
_COMMON_H_
c++/src/capnp/benchmark/common.h
View file @
55826685
...
...
@@ -21,8 +21,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CAPNP
ROTO
_BENCHMARK_COMMON_H_
#define CAPNP
ROTO
_BENCHMARK_COMMON_H_
#ifndef CAPNP_BENCHMARK_COMMON_H_
#define CAPNP_BENCHMARK_COMMON_H_
#include <unistd.h>
#include <limits>
...
...
@@ -282,4 +282,4 @@ int benchmarkMain(int argc, char* argv[]) {
}
// namespace capnp
}
// namespace benchmark
#endif // CAPNP
ROTO
_BENCHMARK_COMMON_H_
#endif // CAPNP_BENCHMARK_COMMON_H_
c++/src/capnp/blob.h
View file @
55826685
...
...
@@ -21,8 +21,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CAPNP
ROTO
_BLOB_H_
#define CAPNP
ROTO
_BLOB_H_
#ifndef CAPNP_BLOB_H_
#define CAPNP_BLOB_H_
#include <kj/common.h>
#include <kj/string.h>
...
...
@@ -200,4 +200,4 @@ inline kj::ArrayPtr<char> Text::Builder::slice(size_t start, size_t end) {
}
// namespace capnp
#endif // CAPNP
ROTO
_BLOB_H_
#endif // CAPNP_BLOB_H_
c++/src/capnp/common.h
View file @
55826685
...
...
@@ -25,8 +25,8 @@
// time, but should then be optimized down to basic primitives (usually, integers) by the
// compiler.
#ifndef CAPNP
ROTO
_COMMON_H_
#define CAPNP
ROTO
_COMMON_H_
#ifndef CAPNP_COMMON_H_
#define CAPNP_COMMON_H_
#include <kj/units.h>
#include <inttypes.h>
...
...
@@ -217,4 +217,4 @@ inline constexpr WordCount intervalLength(const word* a, const word* b) {
}
// namespace capnp
#endif // CAPNP
ROTO
_COMMON_H_
#endif // CAPNP_COMMON_H_
c++/src/capnp/dynamic.h
View file @
55826685
...
...
@@ -32,8 +32,8 @@
// As always, underlying data is validated lazily, so you have to actually traverse the whole
// message if you want to validate all content.
#ifndef CAPNP
ROTO
_DYNAMIC_H_
#define CAPNP
ROTO
_DYNAMIC_H_
#ifndef CAPNP_DYNAMIC_H_
#define CAPNP_DYNAMIC_H_
#include "schema.h"
#include "layout.h"
...
...
@@ -730,48 +730,48 @@ DynamicTypeFor<TypeIfEnum<T>> toDynamic(T&& value) {
inline
DynamicValue
::
Reader
::
Reader
(
std
::
nullptr_t
n
)
:
type
(
UNKNOWN
)
{}
inline
DynamicValue
::
Builder
::
Builder
(
std
::
nullptr_t
n
)
:
type
(
UNKNOWN
)
{}
#define CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR(cppType, typeTag, fieldName) \
#define CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR(cppType, typeTag, fieldName) \
inline DynamicValue::Reader::Reader(cppType value) \
: type(typeTag), fieldName##Value(value) {} \
inline DynamicValue::Builder::Builder(cppType value) \
: type(typeTag), fieldName##Value(value) {}
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
Void
,
VOID
,
void
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
bool
,
BOOL
,
bool
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
char
,
INT
,
int
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
signed
char
,
INT
,
int
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
short
,
INT
,
int
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
int
,
INT
,
int
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
long
,
INT
,
int
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
long
long
,
INT
,
int
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
unsigned
char
,
UINT
,
uint
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
unsigned
short
,
UINT
,
uint
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
unsigned
int
,
UINT
,
uint
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
unsigned
long
,
UINT
,
uint
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
unsigned
long
long
,
UINT
,
uint
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
float
,
FLOAT
,
float
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
double
,
FLOAT
,
float
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
DynamicEnum
,
ENUM
,
enum
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
DynamicObject
,
OBJECT
,
object
);
#undef CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
#define CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR(cppType, typeTag, fieldName) \
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
Void
,
VOID
,
void
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
bool
,
BOOL
,
bool
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
char
,
INT
,
int
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
signed
char
,
INT
,
int
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
short
,
INT
,
int
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
int
,
INT
,
int
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
long
,
INT
,
int
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
long
long
,
INT
,
int
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
unsigned
char
,
UINT
,
uint
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
unsigned
short
,
UINT
,
uint
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
unsigned
int
,
UINT
,
uint
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
unsigned
long
,
UINT
,
uint
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
unsigned
long
long
,
UINT
,
uint
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
float
,
FLOAT
,
float
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
double
,
FLOAT
,
float
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
DynamicEnum
,
ENUM
,
enum
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
DynamicObject
,
OBJECT
,
object
);
#undef CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
#define CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR(cppType, typeTag, fieldName) \
inline DynamicValue::Reader::Reader(const cppType::Reader& value) \
: type(typeTag), fieldName##Value(value) {} \
inline DynamicValue::Builder::Builder(cppType::Builder value) \
: type(typeTag), fieldName##Value(value) {}
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
Text
,
TEXT
,
text
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
Data
,
DATA
,
data
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
DynamicList
,
LIST
,
list
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
DynamicStruct
,
STRUCT
,
struct
);
CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
DynamicUnion
,
UNION
,
union
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
Text
,
TEXT
,
text
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
Data
,
DATA
,
data
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
DynamicList
,
LIST
,
list
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
DynamicStruct
,
STRUCT
,
struct
);
CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
(
DynamicUnion
,
UNION
,
union
);
#undef CAPNP
ROTO
_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
#undef CAPNP_DECLARE_DYNAMIC_VALUE_CONSTRUCTOR
inline
DynamicValue
::
Reader
::
Reader
(
const
char
*
value
)
:
Reader
(
Text
::
Reader
(
value
))
{}
#define CAPNP
ROTO
_DECLARE_TYPE(name, discrim, typeName) \
#define CAPNP_DECLARE_TYPE(name, discrim, typeName) \
template <> \
struct DynamicValue::Reader::AsImpl<typeName> { \
static ReaderFor<typeName> apply(const Reader& reader); \
...
...
@@ -781,29 +781,29 @@ struct DynamicValue::Builder::AsImpl<typeName> { \
static BuilderFor<typeName> apply(Builder& builder); \
};
//CAPNP
ROTO
_DECLARE_TYPE(void, VOID, Void)
CAPNP
ROTO
_DECLARE_TYPE
(
bool
,
BOOL
,
bool
)
CAPNP
ROTO
_DECLARE_TYPE
(
int8
,
INT8
,
int8_t
)
CAPNP
ROTO
_DECLARE_TYPE
(
int16
,
INT16
,
int16_t
)
CAPNP
ROTO
_DECLARE_TYPE
(
int32
,
INT32
,
int32_t
)
CAPNP
ROTO
_DECLARE_TYPE
(
int64
,
INT64
,
int64_t
)
CAPNP
ROTO
_DECLARE_TYPE
(
uint8
,
UINT8
,
uint8_t
)
CAPNP
ROTO
_DECLARE_TYPE
(
uint16
,
UINT16
,
uint16_t
)
CAPNP
ROTO
_DECLARE_TYPE
(
uint32
,
UINT32
,
uint32_t
)
CAPNP
ROTO
_DECLARE_TYPE
(
uint64
,
UINT64
,
uint64_t
)
CAPNP
ROTO
_DECLARE_TYPE
(
float32
,
FLOAT32
,
float
)
CAPNP
ROTO
_DECLARE_TYPE
(
float64
,
FLOAT64
,
double
)
CAPNP
ROTO
_DECLARE_TYPE
(
text
,
TEXT
,
Text
)
CAPNP
ROTO
_DECLARE_TYPE
(
data
,
DATA
,
Data
)
CAPNP
ROTO
_DECLARE_TYPE
(
list
,
LIST
,
DynamicList
)
CAPNP
ROTO
_DECLARE_TYPE
(
struct
,
STRUCT
,
DynamicStruct
)
CAPNP
ROTO
_DECLARE_TYPE
(
enum
,
ENUM
,
DynamicEnum
)
CAPNP
ROTO
_DECLARE_TYPE
(
object
,
OBJECT
,
DynamicObject
)
CAPNP
ROTO
_DECLARE_TYPE
(
union
,
UNION
,
DynamicUnion
)
#undef CAPNP
ROTO
_DECLARE_TYPE
// CAPNP
ROTO
_DECLARE_TYPE(Void) causes gcc 4.7 to segfault. If I do it manually and remove the
//CAPNP_DECLARE_TYPE(void, VOID, Void)
CAPNP_DECLARE_TYPE
(
bool
,
BOOL
,
bool
)
CAPNP_DECLARE_TYPE
(
int8
,
INT8
,
int8_t
)
CAPNP_DECLARE_TYPE
(
int16
,
INT16
,
int16_t
)
CAPNP_DECLARE_TYPE
(
int32
,
INT32
,
int32_t
)
CAPNP_DECLARE_TYPE
(
int64
,
INT64
,
int64_t
)
CAPNP_DECLARE_TYPE
(
uint8
,
UINT8
,
uint8_t
)
CAPNP_DECLARE_TYPE
(
uint16
,
UINT16
,
uint16_t
)
CAPNP_DECLARE_TYPE
(
uint32
,
UINT32
,
uint32_t
)
CAPNP_DECLARE_TYPE
(
uint64
,
UINT64
,
uint64_t
)
CAPNP_DECLARE_TYPE
(
float32
,
FLOAT32
,
float
)
CAPNP_DECLARE_TYPE
(
float64
,
FLOAT64
,
double
)
CAPNP_DECLARE_TYPE
(
text
,
TEXT
,
Text
)
CAPNP_DECLARE_TYPE
(
data
,
DATA
,
Data
)
CAPNP_DECLARE_TYPE
(
list
,
LIST
,
DynamicList
)
CAPNP_DECLARE_TYPE
(
struct
,
STRUCT
,
DynamicStruct
)
CAPNP_DECLARE_TYPE
(
enum
,
ENUM
,
DynamicEnum
)
CAPNP_DECLARE_TYPE
(
object
,
OBJECT
,
DynamicObject
)
CAPNP_DECLARE_TYPE
(
union
,
UNION
,
DynamicUnion
)
#undef CAPNP_DECLARE_TYPE
// CAPNP_DECLARE_TYPE(Void) causes gcc 4.7 to segfault. If I do it manually and remove the
// ReaderFor<> and BuilderFor<> wrappers, it works.
template
<>
struct
DynamicValue
::
Reader
::
AsImpl
<
Void
>
{
...
...
@@ -933,4 +933,4 @@ inline DynamicList::Builder DynamicList::Builder::as<DynamicList>() {
}
// namespace capnp
#endif // CAPNP
ROTO
_DYNAMIC_H_
#endif // CAPNP_DYNAMIC_H_
c++/src/capnp/generated-header-support.h
View file @
55826685
...
...
@@ -23,8 +23,8 @@
// This file is included form all generated headers.
#ifndef CAPNP
ROTO
_GENERATED_HEADER_SUPPORT_H_
#define CAPNP
ROTO
_GENERATED_HEADER_SUPPORT_H_
#ifndef CAPNP_GENERATED_HEADER_SUPPORT_H_
#define CAPNP_GENERATED_HEADER_SUPPORT_H_
#include "layout.h"
#include "list.h"
...
...
@@ -202,17 +202,17 @@ inline constexpr uint64_t typeId() { return internal::TypeId_<T>::typeId; }
}
// namespace capnp
#define CAPNP
ROTO
_DECLARE_ENUM(type, id) \
#define CAPNP_DECLARE_ENUM(type, id) \
template <> struct Kind_<type> { static constexpr Kind kind = Kind::ENUM; }; \
template <> struct TypeId_<type> { static constexpr uint64_t typeId = 0x##id; }; \
template <> struct RawSchema_<type> { \
static inline const RawSchema& get() { return schemas::s_##id; } \
}
#define CAPNP
ROTO
_DEFINE_ENUM(type) \
#define CAPNP_DEFINE_ENUM(type) \
constexpr Kind Kind_<type>::kind; \
constexpr uint64_t TypeId_<type>::typeId;
#define CAPNP
ROTO
_DECLARE_STRUCT(type, id, dataWordSize, pointerCount, preferredElementEncoding) \
#define CAPNP_DECLARE_STRUCT(type, id, dataWordSize, pointerCount, preferredElementEncoding) \
template <> struct Kind_<type> { static constexpr Kind kind = Kind::STRUCT; }; \
template <> struct StructSize_<type> { \
static constexpr StructSize value = StructSize( \
...
...
@@ -222,27 +222,27 @@ inline constexpr uint64_t typeId() { return internal::TypeId_<T>::typeId; }
template <> struct RawSchema_<type> { \
static inline const RawSchema& get() { return schemas::s_##id; } \
}
#define CAPNP
ROTO
_DEFINE_STRUCT(type) \
#define CAPNP_DEFINE_STRUCT(type) \
constexpr Kind Kind_<type>::kind; \
constexpr StructSize StructSize_<type>::value; \
constexpr uint64_t TypeId_<type>::typeId;
#define CAPNP
ROTO
_DECLARE_UNION(type, parentType, memberIndex) \
#define CAPNP_DECLARE_UNION(type, parentType, memberIndex) \
template <> struct Kind_<type> { static constexpr Kind kind = Kind::UNION; }; \
template <> struct UnionMemberIndex_<type> { static constexpr uint value = memberIndex; }; \
template <> struct UnionParentType_<type> { typedef parentType Type; }
#define CAPNP
ROTO
_DEFINE_UNION(type) \
#define CAPNP_DEFINE_UNION(type) \
constexpr Kind Kind_<type>::kind; \
constexpr uint UnionMemberIndex_<type>::value;
#define CAPNP
ROTO
_DECLARE_INTERFACE(type, id) \
#define CAPNP_DECLARE_INTERFACE(type, id) \
template <> struct Kind_<type> { static constexpr Kind kind = Kind::INTERFACE; }; \
template <> struct TypeId_<type> { static constexpr uint64_t typeId = 0x##id; }; \
template <> struct RawSchema_<type> { \
static inline const RawSchema& get() { return schemas::s_##id; } \
}
#define CAPNP
ROTO
_DEFINE_INTERFACE(type) \
#define CAPNP_DEFINE_INTERFACE(type) \
constexpr Kind Kind_<type>::kind; \
constexpr uint64_t TypeId_<type>::typeId;
#endif // CAPNP
ROTO
_GENERATED_HEADER_SUPPORT_H_
#endif // CAPNP_GENERATED_HEADER_SUPPORT_H_
c++/src/capnp/layout-test.c++
View file @
55826685
...
...
@@ -21,7 +21,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CAPNP
ROTO
_PRIVATE
#define CAPNP_PRIVATE
#include "layout.h"
#include "message.h"
#include "arena.h"
...
...
c++/src/capnp/layout.c++
View file @
55826685
...
...
@@ -21,7 +21,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CAPNP
ROTO
_PRIVATE
#define CAPNP_PRIVATE
#include "layout.h"
#include <kj/debug.h>
#include "arena.h"
...
...
c++/src/capnp/layout.h
View file @
55826685
...
...
@@ -28,8 +28,8 @@
// as does other parts of the Cap'n proto library which provide a higher-level interface for
// dynamic introspection.
#ifndef CAPNP
ROTO
_LAYOUT_H_
#define CAPNP
ROTO
_LAYOUT_H_
#ifndef CAPNP_LAYOUT_H_
#define CAPNP_LAYOUT_H_
#include <kj/common.h>
#include "common.h"
...
...
@@ -894,4 +894,4 @@ template <> typename Data::Reader ListReader::getBlobElement<Data>(ElementCount
}
// namespace internal
}
// namespace capnp
#endif // CAPNP
ROTO
_LAYOUT_H_
#endif // CAPNP_LAYOUT_H_
c++/src/capnp/list.h
View file @
55826685
...
...
@@ -21,8 +21,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CAPNP
ROTO
_LIST_H_
#define CAPNP
ROTO
_LIST_H_
#ifndef CAPNP_LIST_H_
#define CAPNP_LIST_H_
#include "layout.h"
#include <initializer_list>
...
...
@@ -549,4 +549,4 @@ private:
}
// namespace capnp
#endif // CAPNP
ROTO
_LIST_H_
#endif // CAPNP_LIST_H_
c++/src/capnp/message.c++
View file @
55826685
...
...
@@ -21,7 +21,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CAPNP
ROTO
_PRIVATE
#define CAPNP_PRIVATE
#include "message.h"
#include <kj/debug.h>
#include "arena.h"
...
...
c++/src/capnp/message.h
View file @
55826685
...
...
@@ -28,8 +28,8 @@
#include "list.h" // TODO(cleanup): For FromReader. Move elsewhere?
#ifndef CAPNP
ROTO
_MESSAGE_H_
#define CAPNP
ROTO
_MESSAGE_H_
#ifndef CAPNP_MESSAGE_H_
#define CAPNP_MESSAGE_H_
namespace
capnp
{
...
...
@@ -370,4 +370,4 @@ static typename Type::Reader defaultValue() {
}
// namespace capnp
#endif // CAPNP
ROTO
_MESSAGE_H_
#endif // CAPNP_MESSAGE_H_
c++/src/capnp/schema-loader.c++
View file @
55826685
...
...
@@ -21,7 +21,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define CAPNP
ROTO
_PRIVATE
#define CAPNP_PRIVATE
#include "schema-loader.h"
#include <unordered_map>
#include <map>
...
...
c++/src/capnp/schema-loader.h
View file @
55826685
...
...
@@ -21,8 +21,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CAPNP
ROTO
_SCHEMA_LOADER_H_
#define CAPNP
ROTO
_SCHEMA_LOADER_H_
#ifndef CAPNP_SCHEMA_LOADER_H_
#define CAPNP_SCHEMA_LOADER_H_
#include "schema.h"
#include <kj/memory.h>
...
...
@@ -108,4 +108,4 @@ inline void SchemaLoader::loadCompiledTypeAndDependencies() {
}
// namespace capnp
#endif // CAPNP
ROTO
_SCHEMA_LOADER_H_
#endif // CAPNP_SCHEMA_LOADER_H_
c++/src/capnp/schema.h
View file @
55826685
...
...
@@ -21,8 +21,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CAPNP
ROTO
_SCHEMA_H_
#define CAPNP
ROTO
_SCHEMA_H_
#ifndef CAPNP_SCHEMA_H_
#define CAPNP_SCHEMA_H_
#include "schema.capnp.h"
...
...
@@ -468,4 +468,4 @@ struct ListSchema::FromImpl<List<T>> {
}
// namespace capnp
#endif // CAPNP
ROTO
_SCHEMA_H_
#endif // CAPNP_SCHEMA_H_
c++/src/capnp/serialize-packed.h
View file @
55826685
...
...
@@ -21,8 +21,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CAPNP
ROTO
_SERIALIZE_PACKED_H_
#define CAPNP
ROTO
_SERIALIZE_PACKED_H_
#ifndef CAPNP_SERIALIZE_PACKED_H_
#define CAPNP_SERIALIZE_PACKED_H_
#include "serialize.h"
...
...
@@ -121,4 +121,4 @@ inline void writePackedMessageToFd(int fd, MessageBuilder& builder) {
}
// namespace capnp
#endif // CAPNP
ROTO
_SERIALIZE_PACKED_H_
#endif // CAPNP_SERIALIZE_PACKED_H_
c++/src/capnp/serialize-snappy.h
View file @
55826685
...
...
@@ -21,8 +21,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CAPNP
ROTO
_SERIALIZE_SNAPPY_H_
#define CAPNP
ROTO
_SERIALIZE_SNAPPY_H_
#ifndef CAPNP_SERIALIZE_SNAPPY_H_
#define CAPNP_SERIALIZE_SNAPPY_H_
#include "serialize.h"
#include "serialize-packed.h"
...
...
@@ -108,4 +108,4 @@ inline void writeSnappyPackedMessage(kj::OutputStream& output, MessageBuilder& b
}
// namespace capnp
#endif // CAPNP
ROTO
_SERIALIZE_SNAPPY_H_
#endif // CAPNP_SERIALIZE_SNAPPY_H_
c++/src/capnp/serialize.h
View file @
55826685
...
...
@@ -40,8 +40,8 @@
// - A multi-segment message can be read entirely in three system calls with no buffering.
// - The format is appropriate for mmap()ing since all data is aligned.
#ifndef CAPNP
ROTO
_SERIALIZE_H_
#define CAPNP
ROTO
_SERIALIZE_H_
#ifndef CAPNP_SERIALIZE_H_
#define CAPNP_SERIALIZE_H_
#include "message.h"
#include <kj/io.h>
...
...
c++/src/capnp/test-util.h
View file @
55826685
...
...
@@ -21,8 +21,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CAPNP
ROTO
_TEST_UTIL_H_
#define CAPNP
ROTO
_TEST_UTIL_H_
#ifndef CAPNP_TEST_UTIL_H_
#define CAPNP_TEST_UTIL_H_
#include "test.capnp.h"
#include <iostream>
...
...
compiler/src/CxxGenerator.hs
View file @
55826685
...
...
@@ -530,7 +530,7 @@ outerFileContext schemaNodes = fileContext where
context
"fileName"
=
MuVariable
$
fileName
desc
context
"fileBasename"
=
MuVariable
$
takeBaseName
$
fileName
desc
context
"fileIncludeGuard"
=
MuVariable
$
"CAPNP
ROTO
_INCLUDED_"
++
hashString
(
fileName
desc
++
':'
:
show
(
fileId
desc
))
"CAPNP_INCLUDED_"
++
hashString
(
fileName
desc
++
':'
:
show
(
fileId
desc
))
context
"fileNamespaces"
=
MuList
$
map
(
namespaceContext
context
)
namespace
context
"fileEnums"
=
MuList
$
map
(
enumContext
context
)
[
e
|
DescEnum
e
<-
fileMembers
desc
]
context
"fileTypes"
=
MuList
$
map
(
typeContext
context
)
flattenedMembers
...
...
compiler/src/c++-header.mustache
View file @
55826685
...
...
@@ -114,15 +114,15 @@ namespace internal {
{{#
fileTypes
}}
{{#
typeStructOrUnion
}}
{{#
typeStruct
}}
CAPNP
ROTO
_DECLARE_STRUCT(
CAPNP_DECLARE_STRUCT(
::
{{#
fileNamespaces
}}{{
namespaceName
}}
::
{{/
fileNamespaces
}}{{
typeFullName
}}
,
{{
structId
}}
,
{{
structDataSize
}}
,
{{
structPointerCount
}}
,
{{
structPreferredListEncoding
}}
);
{{#
structNestedEnums
}}
CAPNP
ROTO
_DECLARE_ENUM(
CAPNP_DECLARE_ENUM(
::
{{#
fileNamespaces
}}{{
namespaceName
}}
::
{{/
fileNamespaces
}}{{
typeFullName
}}
::
{{
enumName
}}
,
{{
enumId
}}
);
{{/
structNestedEnums
}}
{{#
structUnions
}}
CAPNP
ROTO
_DECLARE_UNION(
CAPNP_DECLARE_UNION(
::
{{#
fileNamespaces
}}{{
namespaceName
}}
::
{{/
fileNamespaces
}}{{
structFullName
}}
::
{{
unionTitleCase
}}
,
::
{{#
fileNamespaces
}}{{
namespaceName
}}
::
{{/
fileNamespaces
}}{{
structFullName
}}
,
{{
unionIndex
}}
);
{{/
structUnions
}}
...
...
@@ -130,7 +130,7 @@ CAPNPROTO_DECLARE_UNION(
{{/
typeStructOrUnion
}}
{{/
fileTypes
}}
{{#
fileEnums
}}
CAPNP
ROTO
_DECLARE_ENUM(
CAPNP_DECLARE_ENUM(
::
{{#
fileNamespaces
}}{{
namespaceName
}}
::
{{/
fileNamespaces
}}{{
enumName
}}
,
{{
enumId
}}
);
{{/
fileEnums
}}
} // namespace capnp
...
...
compiler/src/c++-source.mustache
View file @
55826685
...
...
@@ -79,21 +79,21 @@ namespace internal {
{{#
fileTypes
}}
{{#
typeStructOrUnion
}}
{{#
typeStruct
}}
CAPNP
ROTO
_DEFINE_STRUCT(
CAPNP_DEFINE_STRUCT(
::
{{#
fileNamespaces
}}{{
namespaceName
}}
::
{{/
fileNamespaces
}}{{
typeFullName
}}
);
{{#
structNestedEnums
}}
CAPNP
ROTO
_DEFINE_ENUM(
CAPNP_DEFINE_ENUM(
::
{{#
fileNamespaces
}}{{
namespaceName
}}
::
{{/
fileNamespaces
}}{{
typeFullName
}}
::
{{
enumName
}}
);
{{/
structNestedEnums
}}
{{#
structUnions
}}
CAPNP
ROTO
_DEFINE_UNION(
CAPNP_DEFINE_UNION(
::
{{#
fileNamespaces
}}{{
namespaceName
}}
::
{{/
fileNamespaces
}}{{
structFullName
}}
::
{{
unionTitleCase
}}
);
{{/
structUnions
}}
{{/
typeStruct
}}
{{/
typeStructOrUnion
}}
{{/
fileTypes
}}
{{#
fileEnums
}}
CAPNP
ROTO
_DEFINE_ENUM(
CAPNP_DEFINE_ENUM(
::
{{#
fileNamespaces
}}{{
namespaceName
}}
::
{{/
fileNamespaces
}}{{
enumName
}}
);
{{/
fileEnums
}}
} // namespace internal
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment